Object recognition method and device, electronic equipment and computer readable storage medium
By introducing a false detection discrimination model and background image library verification, the problem of background false detection of the visual detection model under the influence of lighting and weather factors is solved, and the accuracy of traffic participant identification is improved.
Patent Information
- Application Number
- CN202410294980.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-14
- Publication Date
- 2025-09-16
AI Technical Summary
Existing traffic participant detection models are prone to background false detections due to factors such as lighting and weather, which significantly reduces system availability.
A false positive discrimination model is introduced to screen the output results of the visual detection model, and the object properties of the target moving object are verified in combination with the background image library of the target detection point. The recognition accuracy is improved by updating the false positive discrimination model.
By automatically updating and iterating the training samples of the false positive discrimination model, the accuracy of object recognition is improved and the probability of system false positives is reduced.
Smart Images

Figure CN120656133A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to an object recognition method, device, electronic device and computer-readable storage medium. Background Art
[0002] "Traffic participants" refer to movable objects in traffic scenes (usually capable of active behavior), primarily vehicles and pedestrians. Using computer vision technology to detect the presence and location of traffic participants in real-time within detection images is a fundamental capability required by smart transportation and digital twins. Currently, the mainstream industry implementation method uses target detection technology from deep learning to train pre-labeled samples in a deep neural network model. This trained detection model is then deployed in business scenarios to continuously detect each frame in the video stream to identify individual traffic participants.
[0003] However, in practical applications, affected by factors such as lighting and weather, the detection model often makes background false detections, that is, mistakenly identifying certain shapes in the background as vehicles or pedestrians, which significantly reduces the usability of the system. Summary of the Invention
[0004] Embodiments of the present application provide an object recognition method, apparatus, electronic device, and computer-readable storage medium, which can improve the accuracy of object recognition.
[0005] The present invention provides an object recognition method, including:
[0006] Acquire at least one image to be detected corresponding to the target detection point, and identify the image to be detected based on the visual detection model to obtain at least one initial moving object;
[0007] Verifying the object attribute of the initial moving object using a false detection discrimination model to obtain a first verification result, and screening at least one target moving object from the initial moving objects based on the first verification result, wherein the first verification result indicates that the object attribute of the target moving object is a real moving object;
[0008] Acquire a background image library corresponding to the target detection point, and detect the motion trajectory of the target moving object at the target detection point to obtain a target trajectory video clip;
[0009] Verifying the object attributes of the target moving object based on the target detection image in the target trajectory video clip and the background image in the background image library to obtain a second verification result;
[0010] Based on the second verification result, the false detection discrimination model is updated, and the visual detection model and the updated false detection discrimination model are used to perform object recognition.
[0011] Accordingly, an embodiment of the present application provides an object recognition device, including:
[0012] A visual initial inspection unit is used to obtain at least one image to be inspected corresponding to a target detection point, and identify the image to be inspected based on a visual inspection model to obtain at least one initial moving object;
[0013] a first verification unit, configured to verify the object attributes of the initial moving objects using a false positive discrimination model, and select at least one target moving object from the initial moving objects based on a first verification result, wherein the first verification result indicates that the object attributes of the target moving object are real moving objects;
[0014] A target detection unit is used to obtain a background image library corresponding to the target detection point, and detect the motion trajectory of the target moving object at the target detection point to obtain a target trajectory video clip;
[0015] a second verification unit, configured to verify the object attributes of the target moving object based on the target detection image in the target trajectory video clip and the background image in the background image library, to obtain a second verification result;
[0016] A model updating unit is used to update the false positive discrimination model based on the second verification result, and use the visual detection model and the updated false positive discrimination model to perform object recognition.
[0017] In some embodiments, the visual initial inspection unit can be specifically used to extract at least one candidate moving object from the image to be detected based on the visual detection model; identify the object attributes of the candidate moving object, and screen out at least one initial moving object from the candidate moving objects based on the recognition result, and the recognition result indicates that the object attributes of the initial moving object are real moving objects.
[0018] In some embodiments, the target detection unit can be specifically used to obtain at least one point detection image taken of the target detection point, classify the point detection image, and obtain a blank background detection image and a non-blank background detection image, wherein the blank background detection image does not include the real moving object; based on the blank background detection image, a background image library corresponding to the target detection point is generated.
[0019] In some embodiments, the target detection unit can be specifically used to compare the number of images of the blank background detection image with a preset image threshold of the background image library; if the number of images of the blank background detection image is greater than the preset image threshold, based on the pixel information of the blank background detection image, determine the first image distance between the blank background detection images in the background image library; based on the first image distance, cluster the blank background detection images to obtain a set of blank background images equal to the preset image threshold, each of the blank background image sets including at least one blank background detection image; select a blank background detection image from each of the blank background image sets to obtain the background image library.
[0020] In some embodiments, the target detection unit can be specifically used to pair the blank background detection images in the background image library to obtain at least one set of blank background image pairs; obtain pixel information corresponding to each of the two blank background detection images in each of the blank background image pairs, wherein the pixel information includes the color channel value corresponding to the pixel point; based on the pixel information, determine the color channel value difference between the pixel points corresponding to the same pixel position of the two blank background detection images in the blank background image pair; and determine the first image distance based on the color channel value difference.
[0021] In some embodiments, the target detection unit can be specifically used to calculate the second image distance between each blank background detection image and other blank background detection images in each blank background image set based on the pixel information of the blank background detection image; sum the second image distances to obtain the total second image distance between each blank background detection image and other blank background detection images; based on the second image total distance, screen out a blank background detection image from the blank background image set to obtain the background image library.
[0022] In some embodiments, the second verification unit can be specifically used to obtain boundary coordinate information corresponding to the initial position area of the target moving object in each target detection image in the target trajectory video clip; based on the boundary coordinate information, filter out the current target detection image of the target moving object from the target detection image; search for a background image corresponding to the background area of the current target detection image from the background image library as the target background image; based on the current target detection image and the target background image, verify the object properties of the target moving object to obtain a second verification result.
[0023] In some embodiments, the second verification unit can be specifically used to obtain boundary coordinate information corresponding to the initial position area of the target moving object in each of the target detection images, and determine the median boundary coordinates of the target moving object based on all boundary coordinate information; crop the target position area corresponding to the median boundary coordinates in each of the target detection images, and determine the third image distance between each of the target detection images and other target detection images based on the pixel information of the target position area; sum the third image distances to obtain the total third image distance between each of the target detection images and other target detection images; based on the total third image distance, filter out the current target detection image of the target moving object from the target detection image.
[0024] In some embodiments, the second verification unit can be specifically used to compare all boundary coordinate information to obtain coordinate similarity; if the coordinate similarity is greater than a preset similarity, the median boundary coordinate of the target moving object is determined based on all boundary coordinate information.
[0025] In some embodiments, the second verification unit can be specifically used to use the visual detection model to identify the current target detection image, obtain at least one moving reference object, and generate a corresponding reference boundary box for each moving reference object; use the area outside the reference boundary box in the current target detection image as the target background area, and generate a preset number of first background sampling frames in the target background area; based on the position information of the target background area, generate a preset number of second background sampling frames in each background image in the background image library, and the number of the second background sampling frames is the same as the number of the first background sampling frames; compare the content of the second background sampling frame in each background image with the first background sampling frame to obtain the content similarity between each background image and the current target detection image; based on the content similarity, filter out the target background image from the background image library.
[0026] In some embodiments, the second verification unit can be specifically used to form a sampling frame pair with the first background sampling frame and the second background sampling frame in the same position; determine the first average color channel value corresponding to the first background sampling frame and the second average color channel value corresponding to the second background sampling frame based on the pixel information of the area where each sampling frame pair is located; calculate the difference between the first average color channel value and the second average color channel value to obtain the color channel value difference of the sampling frame pair; based on the color channel value differences of all sampling frame pairs, determine the content similarity between each background image and the current target detection image.
[0027] In some embodiments, the second verification unit can be specifically used to crop a first target sampling frame corresponding to the median boundary coordinates from the target background image according to the median boundary coordinates of the target moving object, and crop a second target sampling frame corresponding to the median boundary coordinates from the current target detection image; based on the pixel information of the first target sampling frame and the second target sampling frame, the current target detection image is compared with the target background image to obtain a fourth image distance between the current target detection image and the target background image; according to the fourth image distance, the object properties of the target moving object are verified to obtain a second verification result.
[0028] In some embodiments, the second verification unit can be specifically used to compare the image distance between the current target detection image and the target background image with a preset threshold; if the fourth image distance is less than the preset threshold, the second verification result is determined to be that the object attribute of the target moving object is a false moving object; if the fourth image distance is not less than the preset threshold, the second verification result is determined to be that the object attribute of the target moving object is a real moving object.
[0029] In some embodiments, the model updating unit can be specifically used to add the target moving object to the initial labeled sample set of the false detection discrimination model to obtain an updated labeled sample set if the second verification result indicates that the object attribute of the target moving object is a false moving object; and update the false detection discrimination model based on the updated labeled sample set to obtain the updated false detection discrimination model.
[0030] In some embodiments, the model updating unit can be specifically used to obtain all target moving objects at the target detection point and the median boundary coordinates corresponding to the target moving objects; cluster the target moving objects based on the regional positions corresponding to the median boundary coordinates to obtain multiple first-level clusters, each of the first-level clusters including at least one target moving object; determine the target median boundary coordinates of the first-level cluster based on the median boundary coordinates corresponding to the target moving objects in each of the first-level clusters; crop a third target sampling frame corresponding to the target median boundary coordinates from the current target detection image corresponding to the target moving object; obtain the target weight of the target moving object, and add the image content and the target weight corresponding to the third target sampling frame to the initial labeled sample set of the false detection discrimination model.
[0031] In some embodiments, the model updating unit can be specifically used to cluster the target moving objects in each of the first-level clusters based on the color channel values corresponding to the pixel points in the third target sampling frame to obtain at least one second-level cluster, each of the second-level clusters including at least one target moving object; determine the cluster weight of each of the second-level clusters based on the number of target moving objects in the second-level clusters; and determine the target weight of the target moving object based on the cluster weight.
[0032] In addition, an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to execute the object recognition method provided in the embodiment of the present application.
[0033] In addition, an embodiment of the present application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps in the object recognition method provided in the embodiment of the present application.
[0034] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions suitable for loading by a processor to execute the steps in any one of the object recognition methods provided in the embodiment of the present application.
[0035] The embodiment of the present application obtains at least one image to be detected corresponding to a target detection point, and identifies the image to be detected based on a visual detection model to obtain at least one initial moving object; then, a false detection discrimination model is used to verify the object properties of the initial moving object to obtain a first verification result, and at least one target moving object is screened out from the initial moving objects based on the first verification result, wherein the first verification result indicates that the object properties of the target moving object are real moving objects; then, a background image library corresponding to the target detection point is obtained, and the motion trajectory of the target moving object is detected at the target detection point to obtain a target trajectory video clip; then, based on the target detection image in the target trajectory video clip and the background image in the background image library, the object properties of the target moving object are verified to obtain a second verification result; based on the second verification result, the false detection discrimination model is updated, and the visual detection model and the updated false detection discrimination model are used to perform object recognition. Since this solution introduces a false detection discrimination model based on the visual detection model, the false detection discrimination model can screen the output results of the visual detection model. Afterwards, based on the screened target moving objects, the object attributes of the target moving objects are verified in combination with the background image library corresponding to the target detection points, and the false detection discrimination model is periodically updated according to the verification results. The output results of the visual detection model are then verified using the updated false detection discrimination model. This process can automate the workflow of updating the training samples of the false detection discrimination model and the model iteration of the false detection discrimination model, thereby improving the model performance of the false detection discrimination model, and then improving the accuracy of object recognition and reducing the probability of system false detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0037] Figure 1 This is a schematic diagram of an application scenario of the object recognition method provided in an embodiment of the present application;
[0038] Figure 2 Schematic diagram of the process of object recognition provided by the embodiment of the present application;
[0039] Figure 3 is a schematic diagram of an image to be detected provided in an embodiment of the present application;
[0040] Figure 4 This is a data flow diagram of the object recognition method provided by an embodiment of the present application;
[0041] Figure 5 is a schematic diagram of another image to be detected provided in an embodiment of the present application;
[0042] Figure 6 1 is a flow chart of verifying the object attributes of a target mobile object provided by an embodiment of the present application;
[0043] Figure 7 Schematic diagram of a process for cropping from a target detection image according to median boundary coordinates provided in an embodiment of the present application;
[0044] Figure 8A Schematic diagram of the process of generating the first background sampling frame provided in an embodiment of the present application;
[0045] Figure 8B Schematic diagram of the generation process of the second background sampling frame provided in an embodiment of the present application;
[0046] Figure 9 2 is a schematic diagram of content comparison between the second background sampling frame and the first background sampling frame provided in an embodiment of the present application;
[0047] Figure 10 is a schematic diagram of comparing the current target detection image and the target background image provided by an embodiment of the present application;
[0048] Figure 11 This is a schematic diagram of the first-level cluster division provided by the embodiment of the present application;
[0049] Figure 12 is another flowchart of the object recognition method provided in an embodiment of the present application;
[0050] Figure 13 is a schematic structural diagram of an object recognition device provided in an embodiment of the present application;
[0051] Figure 14 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions therein. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.
[0053] The present invention provides an object recognition method, device, and computer-readable storage medium. The object recognition device can be integrated into an electronic device, which can be a server or a user terminal.
[0054] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud preset databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to these. The terminal and the server can be directly or indirectly connected through wired or wireless communication, and this application does not limit this.
[0055] Figure 1 The following is a schematic diagram showing an application scenario of the object recognition method provided in the embodiment of the present application. Figure 1 As shown, the object recognition device is integrated into the electronic device, and the electronic device is a server as an example. The shooting terminal corresponding to the target detection point (such as a terminal device that can take pictures and videos, such as a video camera, a camera, etc.) can establish a communication connection with the server. The target detection point can be a fixed detection point under various application scenarios. For example, the target detection point can be a detection point set at a fixed position in the road area under a traffic application scenario, and used to install the shooting terminal. At this time, the shooting terminal installed on the target detection point can detect the road conditions in the area. The target detection point can also be a monitoring point set at a fixed position in a public place and used to install the shooting terminal. At this time, the shooting terminal installed on the target detection point can detect the scene conditions in the area. It should be understood that the target detection point can also be a detection point for installing the shooting terminal under other application scenarios, which are not listed one by one here.
[0056] For ease of description, the embodiments of this application will be described using the target detection point as a detection point in a traffic application scenario as an example. Intelligent Traffic System (ITS), also known as Intelligent Transportation System, is an effective and integrated application of advanced science and technology (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operations research, artificial intelligence, etc.) to transportation, service control and vehicle manufacturing, strengthening the connection between vehicles, roads and users, thereby forming a comprehensive transportation system that ensures safety, improves efficiency, improves the environment and saves energy.
[0057] The embodiment of the present application can shoot the road conditions of the target detection point through the shooting terminal corresponding to the target detection point to obtain at least one image to be detected. On this basis, the server can obtain at least one image to be detected corresponding to the target detection point, and identify the image to be detected based on the visual detection model to obtain at least one initial moving object; then, the object attribute of the initial moving object is verified by the false detection discrimination model to obtain a first verification result, and at least one target moving object is screened out from the initial moving object based on the first verification result, wherein the first verification result indicates that the object attribute of the target moving object is a real moving object; then, the background image library corresponding to the target detection point is obtained, and the motion trajectory of the target moving object is detected at the target detection point to obtain a target trajectory video clip; then, based on the target detection image in the target trajectory video clip and the background image in the background image library, the object attribute of the target moving object is verified to obtain a second verification result; based on the second verification result, the false detection discrimination model is updated, and the visual detection model and the updated false detection discrimination model are used to perform object recognition.
[0058] It should be noted that Figure 1 There can be multiple shooting terminals, and the server can process data on the images to be detected shot by multiple shooting terminals at the same time, or the server can process data on the images to be detected shot by multiple shooting terminals at different times.
[0059] It can be understood that in the specific implementation of this application, related data such as object identification and object image of the object are involved. When the following embodiments of this application are applied to specific products or technologies, permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0060] It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.
[0061] This embodiment will be described from the perspective of an object recognition device, which can be specifically integrated into an electronic device, which can be a server or a terminal; wherein the terminal can include a tablet computer, a laptop computer, a personal computer (PC), a wearable device, a virtual reality device, or other smart device that can generate an image file.
[0062] An object recognition method includes: obtaining at least one image to be detected corresponding to a target detection point, and based on a visual detection model, identifying the image to be detected to obtain at least one initial moving object; using a false positive discrimination model to verify the object properties of the initial moving object to obtain a first verification result, and based on the first verification result, screening out at least one target moving object from the initial moving objects, wherein the first verification result indicates that the object property of the target moving object is a real moving object; obtaining a background image library corresponding to the target detection point, and detecting the motion trajectory of the target moving object at the target detection point to obtain a target trajectory video clip; verifying the object properties of the target moving object based on the target detection image in the target trajectory video clip and the background image in the background image library to obtain a second verification result; based on the second verification result, updating the false positive discrimination model, and using the visual detection model and the updated false positive discrimination model to perform object recognition.
[0063] Figure 2 FIG. 1 shows a flow chart of an object recognition method provided in an embodiment of the present application. Figure 2 As shown, the specific process of the object recognition method is as follows:
[0064] 101. Acquire at least one image to be detected corresponding to a target detection point, and recognize the image to be detected based on a visual detection model to obtain at least one initial moving object.
[0065] The image to be detected can be understood as each video frame in the video stream captured by the camera terminal at the target detection point. The image to be detected can also be understood as the pictures captured by the camera terminal at the target detection point within a specific time interval.
[0066] Figure 3 FIG. 1 shows a schematic diagram of an image to be detected provided by an embodiment of the present application. Figure 3 As shown, in traffic application scenarios, the image to be detected may include background content such as road surfaces, road signs, and street lights. Relative to traffic participants, the objects corresponding to the background content in the image to be detected can be understood as non-traffic participants in the traffic scene. If traffic participants (i.e., real moving objects in the traffic scene, mainly including vehicles and pedestrians) appear within the field of view of the camera terminal at the target detection point, the image to be detected will accordingly include relevant content of the traffic participants.
[0067] The visual detection model can be an existing deep neural network model deployed in a traffic application scenario, which can continuously detect each frame of the video stream and identify traffic participants in the image. Figure 4 Schematic diagram of data flow of the object recognition method provided by the embodiment of the present application is shown. Figure 4As shown, multiple images to be detected taken at the target detection point can be input into the visual detection model, and the visual detection model can be used to identify the images to be detected to obtain at least one initial moving object. The initial moving object can be understood as a suspected traffic participant identified by the visual detection model from the image to be detected. Therefore, the initial moving object may include traffic participants (real moving objects) or non-traffic participants (false moving objects, such as objects corresponding to the background content in the image to be detected). For example, Figure 3 In the image to be detected shown, the visual detection model can identify the vehicle in the image and use the identified object as the initial moving object.
[0068] Figure 5 FIG. 1 shows another schematic diagram of an image to be detected provided by an embodiment of the present application. Figure 5 As shown, the image to be detected does not include traffic participants, but Figure 5 After the corresponding image to be detected is input into the visual detection model, the visual detection model may make a false detection and identify the non-traffic participants in the image as the initial traffic object ( Figure 5 For example, the visual detection model will Figure 5 Certain shapes on the traffic sign pole are recognized as initial traffic objects, the visual detection model recognizes the shadow part of the traffic sign pole as the initial traffic object, the visual detection model recognizes the color mark on the traffic sign pole as the initial traffic object, and so on.
[0069] Among them, based on the visual detection model, the image to be detected is identified to obtain at least one initial moving object, which can include: based on the visual detection model, extracting at least one candidate moving object from the image to be detected; identifying the object attributes of the candidate moving objects, and screening out at least one initial moving object from the candidate moving objects based on the identification result, wherein the identification result indicates that the object attributes of the initial moving object are real moving objects.
[0070] In the embodiment of the present application, the candidate moving objects can be understood as objects (including real moving objects and false moving objects) that may be recognized by the visual detection model in the image to be detected. For example, the candidate moving objects can be vehicles, pedestrians, zebra crossings, street lights, road signs, etc. After the visual detection model extracts the candidate moving objects from the image to be detected, the object attributes of each candidate moving object can be identified. If the visual detection model identifies the object attributes of the candidate moving object as a real moving object, the candidate moving object is used as the initial moving object; if the visual detection model identifies the object attributes of the candidate moving object as a false moving object, the candidate moving object will not be used as the initial moving object.
[0071] It should be understood that when there are both traffic participants and non-traffic participants in the image to be detected, the visual detection model can also identify the image to be detected, and the identified initial moving objects may all be traffic participants, or may all be non-traffic participants, or may include both traffic participants and non-traffic participants.
[0072] 102. Use a false detection discrimination model to verify the object attributes of the initial moving object to obtain a first verification result, and screen out at least one target moving object from the initial moving object based on the first verification result, wherein the first verification result indicates that the object attributes of the target moving object are real moving objects.
[0073] In practical applications, due to the limitations of the visual detection model's own model performance or the influence of external factors such as lighting and weather, existing visual detection models may probabilistically misidentify certain shapes in the background as vehicles or pedestrians, significantly reducing the system's usability. To this end, this application provides a false positive discrimination model to verify the recognition results of the visual detection model, thereby filtering out false moving objects from the initial moving objects, thereby improving the accuracy of object recognition.
[0074] The false positive discrimination model can be understood as a neural network model obtained by training an initial annotated sample set on the basis of a classic image classification model until convergence. The classic image classification model may be VGGNet (a neural network model), ResNet (a neural network model), etc. The network structure of the false positive discrimination model can be obtained by removing the original output layer of the classic image classification model and adding one or a few fully connected layers and a binary classification output layer. The initial annotated sample set may include pre-collected image samples that were falsely detected as real moving objects, as well as image samples of real moving objects.
[0075] In the embodiment of the present application, the output of the visual detection model can be used as the input of the false detection discrimination model, and the object attributes of each initial moving object can be verified by the false detection discrimination model. If the false detection discrimination model identifies the object attributes of the initial moving object as a real moving object, the initial moving object is used as the target moving object; conversely, if the false detection discrimination model identifies the object attributes of the initial moving object as a false moving object, the initial moving object is screened out.
[0076] For target moving objects identified by the false positive discrimination model, the motion trajectory of the target moving object can be detected based on the specific business needs of the traffic application scenario. When detecting the motion trajectory of the target moving object based on specific business needs, there is no limit on the detection time.
[0077] 103. Obtain a background image library corresponding to the target detection point, and detect the motion trajectory of the target moving object at the target detection point to obtain a target trajectory video clip.
[0078] Because the false positive discrimination model is trained using the initial annotated sample set as training samples, the sample diversity within the initial annotated sample set directly affects the false positive discrimination model's prediction accuracy. During the initial use of the false positive discrimination model, due to the relatively low sample diversity within the initial annotated sample set, the false positive discrimination model's first verification result for verifying the object attributes of the initial moving objects has a relatively low accuracy rate. Although the first verification result indicates that the target moving object's object attributes are real, in reality, there may be false moving objects among the target moving objects.
[0079] In this regard, the embodiment of the present application can further verify the first verification result, that is, verify the object attributes of each target moving object. Specifically, the motion trajectory of each target moving object can be detected at the target detection point to obtain the target trajectory video clip corresponding to each target moving object. The target trajectory video clip is then compared with the background image library corresponding to the target detection point to perform verification.
[0080] The background image library corresponding to the target detection point can be understood as an image collection consisting of point detection images taken at the target detection point that do not contain traffic participants. In an embodiment of the present application, obtaining the background image library corresponding to the target detection point may include: obtaining at least one point detection image taken at the target detection point, classifying the point detection images to obtain blank background detection images and non-blank background detection images, wherein the blank background detection images do not contain real moving objects; and generating the background image library corresponding to the target detection point based on the blank background detection images.
[0081] When a camera terminal at a target detection point doesn't have a traffic participant in its field of view, the resulting point detection image is a blank background detection image. However, when a traffic participant is present, the resulting point detection image is a non-blank background detection image. Non-blank background detection images cannot be included in the background image library. Therefore, the captured point detection images need to be classified and identified, retaining images without traffic participants and discarding those with traffic participants.
[0082] There are many ways to classify point detection images. For example, each point detection image can be manually classified; a background extraction algorithm can be used to extract a blank background detection image from multiple point detection images; or a background extraction algorithm can be used to extract blank background detection images from multiple point detection images, and then the extracted blank background detection images can be manually screened one by one to obtain a background image library.
[0083] Among them, generating a background image library corresponding to the target detection point based on the blank background detection image can include: comparing the number of images of the blank background detection image with the preset image threshold of the background image library; if the number of images of the blank background detection image is greater than the preset image threshold, determining the first image distance between the blank background detection images in the background image library based on the pixel information of the blank background detection image; clustering the blank background detection images based on the first image distance to obtain a set of blank background images equal to the preset image threshold, each blank background image set including at least one blank background detection image; selecting a blank background detection image from each blank background image set to obtain a background image library.
[0084] The visual features of the blank background detection images of the same detection point may vary greatly under different lighting, weather and other conditions. Therefore, the background image library should be a set of blank background detection images of moderate size that can comprehensively reflect and fully represent the background conditions of a certain detection point under various conditions.
[0085] The preset image threshold of the background image library can be set according to actual conditions. For example, the preset image threshold can be 100, 500, 1000, etc. If the number of blank background detection images is greater than the preset image threshold of the background image library, it is necessary to filter out the most representative images that are equal to the preset image threshold from the blank background detection images.
[0086] There are various methods for selecting the most representative images from the blank background detection images, those that meet a preset image threshold. For example, based on the pixel information of each blank background detection image, a first image distance between each pair of blank background detection images can be calculated. The blank background detection images can then be clustered based on the first image distance. From each blank background image set obtained after clustering, a single blank background detection image that best represents the blank background image set can be selected, thereby obtaining a background image library.
[0087] It should be understood that the point detection images captured at the same target detection point have the same image size and resolution. Correspondingly, the blank background detection images from the same target detection point also have the same image size and resolution.
[0088] Specifically, determining the first image distance between blank background detection images in a background image library based on pixel information of the blank background detection image can include: pairing the blank background detection images in the background image library to obtain at least one group of blank background image pairs; obtaining pixel information corresponding to each of the two blank background detection images in each blank background image pair, the pixel information including the color channel value corresponding to the pixel point; determining the color channel value difference between the pixel points corresponding to the same pixel position of the two blank background detection images in the blank background image pair based on the pixel information; and determining the first image distance based on the color channel value difference.
[0089] When pairing blank background detection images in the background image library, each blank background detection image must be paired with other blank background detection images. For example, if the background image library includes five blank background detection images, namely A1, A2, A3, A4, and A5, the blank background image pairs obtained after pairing include A1-A2, A1-A3, A1-A4, A1-A5, A2-A3, A2-A4, A2-A5, A3-A4, A3-A5, and A4-A5, totaling ten blank background image pairs.
[0090] In the embodiment of the present application, the image distance is defined as the sum of the color distances between pixels at the same pixel position on two images of the same size and resolution. The calculation formula for the color distance is defined as:
[0091]
[0092] Among them, Δr, Δg, and Δb are the color channel value differences of the red, green, and blue color channels between a pair of pixel points at the same pixel position, respectively. α, β, and γ are the weights of the red, green, and blue channels, respectively, and the weight values of α, β, and γ are pre-given parameter values.
[0093] Take one of the blank background image pairs (such as A1-A2) as an example. As mentioned above, since the image size and resolution of the blank background detection images from the same target detection point are the same, the image size and resolution of A1 and A2 are the same. On this basis, for a pixel p1 in A1, the pixel at the same pixel position as p1 in A2 is p2. If the color channel values of pixel p1 are r1, g1, and b1, and the color channel values of p2 are r2, g2, and b2, then the color channel value difference between pixel p1 and pixel p2 includes Δr, Δg, and Δb, where Δr = |r1-r2|, Δg = |g1-g2|, and Δb = |b1-b2|. Correspondingly, the color distance between pixel p1 and pixel p2 can be calculated using the above formula, that is:
[0094]
[0095] After calculating the color distance corresponding to each group of pixels in the blank background image pair A1-A2, all color distances are added together to obtain the first image distance between A1 and A2.
[0096] In the process of calculating the first image distance, each blank background detection image in the background image library can be scaled according to the same scaling ratio, and based on the scaled blank background detection image, the first image distance between the blank background detection images in the background image library can be calculated. For example, if the resolution of the blank background detection image in the background image library is 1280×720, the blank background detection image can be reduced to a resolution of 256x144 using a 5-fold scaling ratio, and then the first image distance between the blank background detection images can be calculated. By scaling the blank background detection images in the background image library and then calculating the image distance, not only can the amount of calculation be reduced, but also the interference of the external environment on the blank background detection image can be reduced (for example, the local disturbance caused by wind blowing the leaves will be naturally weakened after the resolution is reduced), thereby improving robustness.
[0097] After determining the first image distance between the blank background detection images in the background image library, the blank background detection images may be clustered based on the first image distance to obtain a set of blank background images that are equal to a preset image threshold.
[0098] Based on the first image distance, the blank background detection images are clustered, and there can be many ways to obtain a blank background image set that is equal to the preset image threshold. For example, a union-find data structure can be used to create an original tag set for each blank background detection image, and the first image distance is sorted in order from small to large to check each group of blank background image pairs. If two images still belong to different original tag sets, the original tag sets corresponding to the two images are merged into one tag set until the number of tag sets equals the preset image threshold. The tag set obtained after the merger is the blank background image set. The number of blank background image sets is less than the number of original tag sets (i.e., the number of blank background detection images). At this time, each blank background image set contains at least one blank background detection image.
[0099] To ensure that the number of blank background detection images in the background image library is the same as the preset image threshold, it is necessary to select a blank background detection image from each blank background image set. The selected blank background detection image is the blank background detection image in the background image library. If the blank background image set contains only one blank background detection image, you can directly use that blank background detection image as the blank background detection image in the background image library; if the blank background image set contains two blank background detection images, you can use any one of them as the blank background detection image in the background image library; if the blank background image set contains three or more blank background detection images, you need to select an image that best represents the blank background image set as the blank background detection image in the background image library.
[0100] Specifically, selecting a blank background detection image from each blank background image set to obtain a background image library can include: calculating the second image distance between each blank background detection image and other blank background detection images in each blank background image set based on pixel information of the blank background detection image; summing the second image distances to obtain the total second image distance between each blank background detection image and other blank background detection images; and screening out a blank background detection image from the blank background image set based on the total second image distance to obtain the background image library.
[0101] Let's take a blank background image set containing three blank background detection images (B1, B2, and B3) as an example. In this blank background image set, the second image distance corresponding to B1 includes the image distance between B1 and B2, and the image distance between B1 and B3. Based on this, the image distances between B1 and B2, and the image distances between B1 and B3, are summed to obtain the total second image distance corresponding to B1. Similarly, in this blank background image set, the second image distance corresponding to B2 includes the image distance between B2 and B1, and the image distance between B2 and B3. Based on this, the image distances between B2 and B1, and the image distances between B2 and B3, are summed to obtain the total second image distance corresponding to B2. Correspondingly, the second image distance corresponding to B3 includes the image distance between B3 and B1, and the image distance between B3 and B2. Based on this, the image distances between B3 and B1, and the image distances between B3 and B2, are summed to obtain the total second image distance corresponding to B3.
[0102] After determining the total second image distance of each blank background detection image in the blank background image set, the blank background detection image with the smallest total second image distance can be selected as the image that best represents the blank background image set and added to the background image library. By selecting the blank background detection image sets from each blank background image set, a background image library corresponding to the target detection point can be obtained.
[0103] In an embodiment of the present application, the images in the background image library can be periodically updated. For example, at regular intervals, new point detection images taken at target detection points are acquired and classified to obtain new blank background detection images. Subsequently, based on the new blank background detection images and the existing blank background detection images in the background image library, images that meet a preset image threshold are screened from the aforementioned images to obtain an updated background image library.
[0104] In the embodiments of the present application, a target trajectory video segment can be understood as a video segment obtained by detecting the motion trajectory of a target moving object at a target detection point according to a preset duration. The preset duration can be set according to actual circumstances, for example, 10 seconds, 30 seconds, 1 minute, etc. The server can detect the motion trajectory of each target moving object using a camera terminal installed at the target detection point to obtain a target trajectory video segment corresponding to each target moving object.
[0105] 104. Verify the object properties of the target moving object based on the target detection image in the target trajectory video clip and the background image in the background image library to obtain a second verification result.
[0106] In the embodiment of the present application, for the convenience of description, the images in the background image library are referred to as background images. It should be understood that the background images are the blank background detection images that constitute the background image library in step 103.
[0107] After determining the target trajectory video clip of the target moving object and the background image library corresponding to the target detection point, the target trajectory video clip can be compared with the background image library, and the object attributes of the target moving object can be determined based on the comparison result to obtain a second verification result. Figure 6 FIG. 1 shows a flow chart of verifying the object attributes of a target mobile object provided by an embodiment of the present application. Figure 6As shown, based on the target detection image in the target trajectory video clip and the background image in the background image library, the object attributes of the target moving object are verified to obtain a second verification result, which may include: obtaining boundary coordinate information corresponding to the initial position area of the target moving object in each target detection image in the target trajectory video clip; based on the boundary coordinate information, screening out the current target detection image of the target moving object from the target detection image; searching for a background image corresponding to the background area of the current target detection image from the background image library as the target background image; based on the current target detection image and the target background image, verifying the object attributes of the target moving object to obtain a second verification result.
[0108] A target trajectory video segment includes multiple video frames. For ease of description, each video frame is referred to as a target detection image in the target trajectory segment. In each target detection image, a corresponding bounding box is generated based on the area occupied by the target moving object (i.e., the initial position area). Each bounding box is associated with a set of bounding coordinates. This bounding coordinate information can be used to represent the position of the target moving object in the target detection image, facilitating subsequent calculations.
[0109] The shape of the bounding box corresponding to the target moving object can be adapted to the outline of the target moving object. For example, the shape of the bounding box of the target moving object can be the same as the outline of the target moving object. In this case, if the outline of the target moving object is an irregular shape, it will increase the difficulty of representing the boundary coordinate information to a certain extent, thereby increasing the amount of calculation.
[0110] In an embodiment of the present application, the bounding box shape of the target moving object can be set to a quadrilateral. On this basis, the quadrilateral is adaptively adjusted based on the contour of the target moving object itself to obtain a bounding box representing the target moving object, and the boundary coordinate information is determined based on the position of the bounding box in the coordinate system. The quadrilateral bounding box includes a left boundary, a right boundary, an upper boundary, and a lower boundary. Accordingly, the boundary coordinate information may include the left boundary horizontal coordinate, the right boundary horizontal coordinate, the upper boundary vertical coordinate, and the lower boundary vertical coordinate.
[0111] After determining the boundary coordinate information of the target moving object in each target detection image, a target detection image that best represents the position information of the target moving object can be screened out from the target detection images contained in the target trajectory video clip based on the above boundary coordinate information, and the screened target detection image can be used as the current target detection image.
[0112] Among them, based on the boundary coordinate information, filtering out the current target detection image of the target moving object from the target detection image can include: obtaining the boundary coordinate information corresponding to the initial position area of the target moving object in each target detection image, and determining the median boundary coordinates of the target moving object based on all boundary coordinate information; cropping out the target position area corresponding to the median boundary coordinates in each target detection image, and determining the third image distance between each target detection image and other target detection images based on the pixel information of the target position area; summing the third image distances to obtain the total third image distance between each target detection image and other target detection images; based on the total third image distance, filtering out the current target detection image of the target moving object from the target detection image.
[0113] The following example illustrates a video clip of a moving target object's target trajectory, including ten target detection images (C1, C2, C3, C4, C5, C6, C7, C8, C9, and C10). Each target detection image of the moving target object has corresponding boundary coordinate information. It should be understood that the number of target detection images included in a video clip of the moving target object's target trajectory can also be other values, and the above example does not limit the number of target detection images included in the video clip of the target trajectory.
[0114] Among them, determining the median boundary coordinates of the target moving object based on all boundary coordinate information can include: comparing all boundary coordinate information to obtain coordinate similarity; if the coordinate similarity is greater than a preset similarity, determining the median boundary coordinates of the target moving object based on all boundary coordinate information.
[0115] In an embodiment of the present application, the boundary coordinate information of the target moving object in each target detection image can be used as the basis to calculate the coordinate similarity between all boundary coordinate information, and determine whether the target moving object is a real moving object based on the coordinate similarity. If the target moving object is determined to be a real moving object based on the coordinate similarity, the second verification result is directly obtained; if the target moving object cannot be directly determined to be a real moving object based on the coordinate similarity, it is necessary to continue to perform subsequent steps (i.e., determine the median boundary coordinate of the target moving object based on all boundary coordinate information).
[0116] Among them, the following method can be used to calculate the coordinate similarity between all boundary coordinate information: extract the corresponding left boundary horizontal coordinate, right boundary horizontal coordinate, upper boundary vertical coordinate and lower boundary vertical coordinate from all boundary coordinate information; compare all the extracted left boundary horizontal coordinates to obtain the left boundary horizontal coordinate similarity; compare all the extracted right boundary horizontal coordinates to obtain the right boundary horizontal coordinate similarity; compare all the extracted upper boundary vertical coordinates to obtain the upper boundary vertical coordinate similarity; compare all the extracted lower boundary vertical coordinates to obtain the lower boundary vertical coordinate similarity.
[0117] In order to reduce random deviations during the shooting process, when calculating the coordinate similarity between all boundary coordinate information, all left boundary horizontal coordinates can be arranged in ascending order, and the difference between two specific percentiles can be taken (for example, the difference between the 95th percentile and the 5th percentile), and the reciprocal of the difference can be used as the left boundary horizontal coordinate similarity. Similarly, all right boundary horizontal coordinates, all upper boundary vertical coordinates, and all lower boundary vertical coordinates can be arranged in ascending order, and the difference between two specific percentiles can be taken, and the reciprocal of the difference can be used as the right boundary horizontal coordinate similarity, the upper boundary vertical coordinate similarity, and the lower boundary vertical coordinate similarity.
[0118] If any one of the left boundary horizontal coordinate similarity, the right boundary horizontal coordinate similarity, the upper boundary vertical coordinate similarity and the lower boundary vertical coordinate similarity is less than a certain threshold (preset similarity, which can be set according to actual conditions), it indicates that the target moving object has displaced in this direction. Therefore, it can be determined that the target moving object is a real moving object.
[0119] On the contrary, if any one of the horizontal coordinate similarity of the left boundary, the horizontal coordinate similarity of the right boundary, the vertical coordinate similarity of the upper boundary, and the vertical coordinate similarity of the lower boundary is greater than a certain threshold (i.e., a preset similarity, which can be set according to actual conditions), it indicates that the target moving object is approximately stationary in that direction. If the horizontal coordinate similarity of the left boundary, the horizontal coordinate similarity of the right boundary, the vertical coordinate similarity of the upper boundary, and the vertical coordinate similarity of the lower boundary are all greater than the preset similarity, it indicates that the initial position area of the target moving object in the target detection image has basically not changed, that is, the target moving object is approximately stationary. At this time, the target moving object may be a real moving object (a stationary traffic participant) or a false moving object (an object other than a traffic participant, which can also be understood as an object in the background).
[0120] When it is impossible to determine whether the target moving object is a real moving object through the left boundary horizontal coordinate similarity, right boundary horizontal coordinate similarity, upper boundary vertical coordinate similarity and lower boundary vertical coordinate similarity, the median boundary coordinate of the target moving object can be determined based on all boundary coordinate information, and then the object properties of the target moving object can be verified according to the median boundary coordinate.
[0121] Among them, the median boundary coordinates of the target moving object can be determined in the following way: take the median of all left boundary horizontal coordinates to obtain the left boundary median horizontal coordinate; take the median of all right boundary horizontal coordinates to obtain the right boundary median horizontal coordinate; take the median of all upper boundary vertical coordinates to obtain the upper boundary median vertical coordinate; take the median of all lower boundary vertical coordinates to obtain the lower boundary median vertical coordinate; take the left boundary median horizontal coordinate, the right boundary median horizontal coordinate, the upper boundary median vertical coordinate and the lower boundary median vertical coordinate as the median boundary coordinates.
[0122] The median boundary coordinates may be the same as or different from the boundary coordinates corresponding to the initial position region of the target moving object in the target detection image. After determining the median boundary coordinates of the target moving object, the target position region corresponding to the median boundary coordinates may be cropped from each target detection image, and based on the pixel information of the target position region, a third image distance between each target detection image and other target detection images may be determined.
[0123] As mentioned above, since the median boundary coordinates may be the same as or different from the boundary coordinates corresponding to the initial position area of the target moving object in the target detection image, the target position area may be the same as or different from the initial position area. Taking any target detection image (such as C1, C2, C3, C4, C5, C6, C7, C8, C9 or C10) in the target trajectory video clip as an example, Figure 7 Schematic diagram of the process of cropping from the target detection image according to the median boundary coordinates provided by the embodiment of the present application is shown. Figure 7 As shown, the initial position region and the target position region are located differently. It should be understood that the target position region corresponding to the median boundary coordinates in each target detection image has the same size and resolution.
[0124] After determining the target position area corresponding to the median boundary coordinates in each target detection image, the image distance between each target position area can be determined based on the pixel information of each target position area, and the image distance between each target position area can be used as the third image distance.
[0125] For the sake of convenience of description, the target position area in the target detection image C1 is represented as C1a, and the target position area in the target detection image C2 is represented as C2a. Similarly, the target position areas in other target detection images (including C3, C4, C5, C6, C7, C8, C9 and C10) are represented as C3a, C4a, C5a, C6a, C7a, C8a, C9a and C10a respectively.
[0126] For each target location area, the image distance (i.e., the third image distance) between it and other target location areas must be calculated separately. For example, for C1a, the image distance (i.e., the third image distance) between it and C2a, C3a, C4a, C5a, C6a, C7a, C8a, C9a, and C10a must be calculated separately. Similarly, for C2a, the image distance (i.e., the third image distance) between it and C1a, C3a, C4a, C5a, C6a, C7a, C8a, C9a, and C10a must be calculated separately.
[0127] After determining the third image distances between each target location region and the other target location regions, the third image distances can be summed to obtain the total third image distances between each target detection image and the other target detection images. For example, if the third image distances between C1a and C2a, C3a, C4a, C5a, C6a, C7a, C8a, C9a, and C10a are D12, D13, D14, D15, D16, D17, D18, D19, and D110, respectively, then by summing D12, D13, D14, D15, D16, D17, D18, D19, and D110, the total third image distances between target detection image C1 and the other target detection images (C2, C3, C4, C5, C6, C7, C8, C9, and C10) can be obtained.
[0128] In the embodiment of the present application, the calculation method of the (third) image distance is as described above and will not be repeated here.
[0129] After determining the third image total distance between each target detection image and other target detection images, the current target detection image of the target moving object may be screened out from the target detection images based on the third image total distance.
[0130] The current target detection image can be understood as an image that best represents the target moving object among the target detection images included in the target trajectory video clip. In this embodiment of the present application, the target detection image with the smallest total distance of the third image can be used as the current target detection image.
[0131] After determining the current target detection image, the object attributes of the target moving object can be verified again based on the third image distance corresponding to the current target detection image. For example, the third image distance at a specific percentile (such as the 90th percentile) can be compared with a certain threshold (which can be set according to actual conditions). If the 90th percentile value of the third image distance is greater than the threshold, it indicates that the target location areas in the various target detection images are different. In this case, the target moving object can be determined to be a real moving object, and the second verification result can be directly obtained.
[0132] On the contrary, if the 90th percentile value of the third image distance is less than the threshold, it indicates that the target moving object is approximately stationary. At this time, the target moving object may be a real moving object (a stationary traffic participant) or a false moving object (an object other than a traffic participant, which can also be understood as an object in the background).
[0133] After the current target detection image is screened out from the target trajectory video clip, a background image having the greatest similarity to the background area of the current target detection image can be searched from the background image library as the target background image.
[0134] Among them, searching for a background image with the greatest similarity to the background area of the current target detection image from the background image library as the target background image can include: using a visual detection model to identify the current target detection image, obtaining at least one moving reference object, and generating a corresponding reference boundary box for each moving reference object; using the area outside the reference boundary box in the current target detection image as the target background area, and generating a preset number of first background sampling frames in the target background area; based on the position information of the target background area, generating a preset number of second background sampling frames in each background image in the background image library, and the number of the second background sampling frames is the same as the number of the first background sampling frames; comparing the content of the second background sampling frame in each background image with the first background sampling frame to obtain the content similarity of each background image with the current target detection image; and screening out the target background image from the background image library based on the content similarity.
[0135] The moving reference objects are all initial moving objects identified by the visual detection model and contained in the current target detection image. The moving reference objects can be understood as all suspected transaction participants in the current target detection image.
[0136] Figure 8A FIG. 1 shows a schematic diagram of the generation process of the first background sampling frame provided in an embodiment of the present application. Figure 8A As shown, in the embodiment of the present application, a corresponding reference bounding box can be generated for each moving reference object. Figure 8AThe solid line portion represents a reference bounding box. By using the reference bounding box, the target background region of the current target detection image can be distinguished. Specifically, the region outside the reference bounding box can be used as the target background region.
[0137] After determining the target background area of the current target detection image, a specified number of first background sampling frames can be randomly generated in the target background area. Figure 8A The dashed line in the middle represents the first background sampling frame. For example, the number of first background sampling frames can be 10, 100, 1000, and so on. In addition, the size of each first background sampling frame can also be specified. For example, the size of the first background sampling frame can be set to 5×5 pixels, 10×10 pixels, and so on.
[0138] In an embodiment of the present application, by delineating the target background area and generating a first background sampling frame within the target background area, interference from suspected traffic participants in the current target detection image can be avoided, thereby being used to measure the background similarity between the current target detection image and the background images in the background image library.
[0139] Figure 8B FIG. 1 shows a schematic diagram of the generation process of the second background sampling frame provided in an embodiment of the present application. Figure 8B As shown, after generating the first background sampling frame in the current target detection image, a second background sampling frame at the same position as the first background sampling frame can be generated in each background image in the background image library. Figure 8B The dashed line in the middle represents the second background sampling frame. The number of the second background sampling frames is the same as the number of the first background sampling frames, the size of the second background sampling frames is the same as the size of the first background sampling frames, and the position of the second background sampling frames in the background image is the same as the position of the first background sampling frames in the current target detection image.
[0140] After the first background sampling frame and the second background sampling frame in each background image are determined, for each background image, the second background sampling frame contained therein may be compared with the first background sampling frame.
[0141] Specifically, the second background sampling frame in each background image is compared with the first background sampling frame in terms of content to obtain the content similarity between each background image and the current target detection image, which may include: forming a sampling frame pair with the first background sampling frame and the second background sampling frame in the same position; determining the first average color channel value corresponding to the first background sampling frame and the second average color channel value corresponding to the second background sampling frame based on the pixel information of the area where each sampling frame pair is located; calculating the difference between the first average color channel value and the second average color channel value to obtain the color channel value difference of the sampling frame pair; and determining the content similarity between each background image and the current target detection image based on the color channel value differences of all sampling frame pairs.
[0142] Figure 9 FIG. 1 shows a schematic diagram of content comparison between the second background sampling frame and the first background sampling frame provided in an embodiment of the present application. Figure 9 As shown in the figure, the first background sampling frames in the current target detection image are represented as a, b, c, d, and e, respectively, and the second background sampling frames in the background image are represented as a', b', c', d', and e', respectively. Among them, a and a' are at the same position and can form a sampling frame pair; b and b' are at the same position and can form a sampling frame pair; c and c' are at the same position and can form a sampling frame pair; d and d' are at the same position and can form a sampling frame pair; e and e' are at the same position and can form a sampling frame pair.
[0143] For any pair of sampling frames, taking the pair consisting of a and a' as an example, the average color channel values of all pixels in the first background sampling frame a can be calculated as the first average color channel value of the first background sampling frame a; and the average color channel values of all pixels in the second background sampling frame a' can be calculated as the second average color channel value of the second background sampling frame a'. The absolute value of the difference between the first and second average color channel values is then used as the color channel value difference corresponding to the sampling frame pair (the sampling frame pair consisting of a and a'). Similarly, for other sampling frame pairs, the corresponding color channel value differences can be calculated using the same method.
[0144] In the embodiment of the present application, the method for calculating the color channel value difference can refer to the color distance calculation method described above, that is, the color channel value difference of the sampling frame pair can be understood as the color distance between the first background sampling frame and the second background sampling frame in the sampling frame pair.
[0145] After determining the color channel value differences for all pairs of sampling frames, the image distance between the background image and the current target detection image can be calculated based on the color channel value differences. The content similarity between the background image and the current target detection image is then determined based on the calculated image distance. The greater the image distance between the background image and the current target detection image, the less similar the content between the background image and the current target detection image is.
[0146] In an embodiment of the present application, in the process of calculating the image distance between the background image and the current target detection image based on the color channel value difference, the one-sided truncated mean of all the color channel value differences can also be calculated first, and the calculated one-sided truncated mean is used as the image distance between the background image and the current target detection image. Specifically, all the color channel value differences can be sorted in order from small to large, and a certain proportion of the color channel value differences at the back (which can be set according to actual conditions, such as 5%, 10%, etc.) are discarded. The average of the remaining color channel value differences is calculated to obtain the one-sided truncated mean of all the color channel value differences.
[0147] In practical applications, the current target detection image may contain real traffic participants that were missed by the visual detection module. If the first background sampling frame intersects with these missed traffic participants, a large and erroneous color distance may be calculated, leading to a biased estimate. Furthermore, the shadows of traffic participants can also introduce a certain degree of interference. Typically, the area occupied by these missed traffic participants and their shadows is not significant in the image. Using the one-sided truncated mean as the image distance between the background image and the current target detection image can effectively eliminate this bias and enhance the robustness of the results.
[0148] After determining the content similarity between each background image and the current target detection image, the background image with the highest content similarity to the current target detection image can be selected from the background images as the target background image. The target background image can also be understood as the background image in the background image library that has the smallest image distance to the target background area of the current target detection image.
[0149] After filtering out the current target detection image corresponding to the target moving object from the target trajectory video clip and filtering out the target background image from the background image library, the current target detection image and the target background image can be compared, and a second verification result can be determined based on the comparison result.
[0150] Specifically, based on the current target detection image and the target background image, the object properties of the target moving object are verified to obtain a second verification result, which may include: according to the median boundary coordinates of the target moving object, cropping a first target sampling frame corresponding to the median boundary coordinates from the target background image, and cropping a second target sampling frame corresponding to the median boundary coordinates from the current target detection image; based on the pixel information of the first target sampling frame and the second target sampling frame, comparing the current target detection image with the target background image to obtain a fourth image distance between the current target detection image and the target background image; based on the fourth image distance, verifying the object properties of the target moving object to obtain a second verification result.
[0151] Figure 10 FIG. 1 shows a schematic diagram of comparing the current target detection image and the target background image provided by an embodiment of the present application. Figure 10 As shown, according to the median boundary coordinates of the target moving object, a first target sampling frame can be cropped from the target background image, and a second target sampling frame can be cropped from the current target detection image. After obtaining the first target sampling frame and the second target sampling frame, the aforementioned image distance calculation method can be used to calculate the image distance between the first target sampling frame and the second target sampling frame based on the pixel information within the first target sampling frame and the pixel information within the second target sampling frame. This distance is then used as the fourth image distance between the current target detection image and the target background image.
[0152] After the fourth image distance between the current target detection image and the target background image is determined, the object attribute of the target moving object can be determined based on the fourth image distance.
[0153] In an embodiment of the present application, the object attribute of the target moving object is verified according to the fourth image distance to obtain a second verification result, which may include: comparing the image distance between the current target detection image and the target background image with a preset threshold; if the fourth image distance is less than the preset threshold, determining that the second verification result is that the object attribute of the target moving object is a false moving object; if the fourth image distance is not less than the preset threshold, determining that the second verification result is that the object attribute of the target moving object is a real moving object.
[0154] The specific value of the preset threshold can be set according to actual conditions. For example, the preset threshold can be set to a value that is a multiple of the perimeter of the target position area (the area corresponding to the median boundary coordinates) of the target moving object.
[0155] If the fourth image distance is less than the preset threshold, it indicates that the content of the second target sampling frame is substantially the same as that of the first target sampling frame, that is, the target moving object is substantially the same as the background content. Therefore, it can be determined that the object attribute of the target moving object is a false moving object.
[0156] On the contrary, if the fourth image distance is greater than or equal to the preset threshold, it indicates that there is a large difference between the content of the second target sampling frame and the content of the first target sampling frame, that is, there is a large difference between the target moving object and the background content. Based on this, it can be determined that the object attribute of the target moving object is a real moving object.
[0157] 105. Based on the second verification result, the false positive discrimination model is updated, and the visual detection model and the updated false positive discrimination model are used to perform object recognition.
[0158] Since the second verification result is the result obtained after re-verification based on the first verification result, and the first verification result is obtained by prediction using the false detection discrimination model, therefore, if the second verification result is consistent with the first verification result, it indicates that the model performance of the false detection discrimination model is good; on the contrary, if the second verification result is inconsistent with the first verification result, it indicates that the model performance of the false detection discrimination model needs to be improved. At this time, the false detection discrimination model can be continued to be trained according to the second verification result to obtain an updated false detection discrimination model.
[0159] After obtaining the updated false positive discrimination model, a new image to be detected, captured by the shooting terminal at the target detection point, can be input into the visual detection model. The image to be detected is then identified using the visual detection model to obtain at least one initial moving object. The updated false positive discrimination model is then used to verify the object properties of the initial moving object, screening out the target moving object from the initial moving objects. Subsequently, the motion trajectory of the target moving object can be detected based on the specific business needs of the traffic application scenario. Steps 103 to 105 can also be continued to verify the object properties of the target moving object, obtaining a second verification result, and the updated false positive discrimination model can be updated based on the verification result.
[0160] In an embodiment of the present application, updating the false detection discrimination model based on the second verification result may include: if the second verification result indicates that the object attribute of the target moving object is a false moving object, adding the target moving object to the initial labeled sample set of the false detection discrimination model to obtain an updated labeled sample set; updating the false detection discrimination model based on the updated labeled sample set to obtain an updated false detection discrimination model.
[0161] In the process of object recognition, as data continues to accumulate, constantly updating the samples in the initial labeled sample set can improve the sample diversity in the initial labeled sample set. On this basis, continuously training the false positive discrimination model can improve the model performance of the false positive discrimination model, thereby improving the accuracy of object recognition.
[0162] Among them, adding the target moving object to the initial annotated sample set of the false detection discrimination model can include: obtaining all target moving objects at the target detection point and the median boundary coordinates corresponding to the target moving objects; clustering the target moving objects based on the regional position corresponding to the median boundary coordinates to obtain multiple first-level clusters, each first-level cluster including at least one target moving object; determining the target median boundary coordinates of the first-level cluster based on the median boundary coordinates corresponding to the target moving objects in each first-level cluster; cropping a third target sampling frame corresponding to the target median boundary coordinates from the current target detection image corresponding to the target moving object; obtaining the target weight of the target moving object, and adding the image content and target weight corresponding to the third target sampling frame to the initial annotated sample set of the false detection discrimination model.
[0163] In the embodiment of the present application, the method of steps 101 to 104 is used to screen out false moving objects that are mistakenly identified by the false detection discrimination model at regular intervals. As mentioned above, the false moving objects are non-traffic participants, but they are mistakenly identified as traffic participants by the visual detection model and the false detection discrimination model. For any target detection point, the background portion of the image captured by the camera terminal installed at the target detection point is basically the same, but the background content at different positions in the image is different, and the probability of different background content being mistakenly identified as traffic participants is different. Therefore, the number of samples of false moving objects corresponding to different positions of the image will be unbalanced, resulting in the updated false detection discrimination model obtained through subsequent training being much more sensitive to certain areas than to other areas, which is not conducive to improving the model performance of the false detection discrimination model.
[0164] In this regard, in the embodiment of the present application, the false moving objects that are incorrectly identified by the false detection discrimination model and are screened out at regular intervals can be clustered according to their position coordinates, thereby dividing these target moving objects into different primary clusters according to their different positions in the picture. It should be understood that the target moving objects added to the initial annotated sample set are the false moving objects determined based on the second verification results.
[0165] For ease of description, an example is given where, at a certain target detection point within a period of time, the second verification result indicates that eight target moving objects (respectively, target moving object 1, target moving object 2, target moving object 3, target moving object 4, target moving object 5, target moving object 6, target moving object 7, and target moving object 8) are false moving objects. The median boundary coordinates of the target moving objects can be determined in the manner described above, which will not be described in detail here. Based on the regional position corresponding to the median boundary coordinates, there are many ways to cluster the target moving objects. For example, a K-means clustering algorithm, a spectral clustering algorithm, etc. can be used to cluster the median boundary coordinates of the five target moving objects, thereby dividing the five target moving objects into corresponding first-level clusters according to their different positions in the image.
[0166] It should be understood that within a period of time, the positions of the target moving objects indicated as false moving objects by the second verification result may be completely different or may overlap.
[0167] Figure 11 The diagram of the primary cluster division provided by the embodiment of the present application is shown. Figure 11 As shown in the figure, after clustering the above eight target moving objects, three first-level clusters can be obtained, among which target object 1 constitutes a first-level cluster alone; target object 2 and target object 3 are classified into the same first-level cluster because their positions are relatively close; target moving object 4, target moving object 5, target moving object 6, target moving object 7 and target moving object 8 are relatively close in position and are classified into the same first-level cluster.
[0168] Based on the median boundary coordinates corresponding to the target moving objects in each first-level cluster, determining the target median boundary coordinates of the first-level cluster can include: for each first-level cluster, obtaining the median boundary coordinates of the target moving objects contained therein, taking the median of all the median boundary coordinates of the first-level cluster, and obtaining the target median boundary coordinates of the first-level cluster. Since each median boundary coordinate includes the left boundary median horizontal coordinate, the right boundary median horizontal coordinate, the upper boundary median vertical coordinate, and the lower boundary median vertical coordinate, the median of all left boundary median horizontal coordinates can be taken to obtain the target left boundary median horizontal coordinate; the median of all right boundary median horizontal coordinates can be taken to obtain the target right boundary median horizontal coordinate; the median of all upper boundary median vertical coordinates can be taken to obtain the target upper boundary median vertical coordinate; the median of all lower boundary median vertical coordinates can be taken to obtain the target lower boundary median vertical coordinate; and then the target left boundary median horizontal coordinate, the target right boundary median horizontal coordinate, the target upper boundary median vertical coordinate, and the target lower boundary median vertical coordinate are used as the target median boundary coordinates.
[0169] After determining the target median boundary coordinates of each primary cluster, a third target sampling frame corresponding to the target median boundary coordinates can be cropped from the current target detection image corresponding to each target moving object. It should be understood that the number of third target sampling frames is the same as the number of target moving objects.
[0170] After determining the third target sampling frame corresponding to each first-level cluster, the target weight of the target moving object can be obtained, and the image content and target weight corresponding to the third target sampling frame can be added to the initial labeled sample set of the false detection discrimination model.
[0171] The image content corresponding to the third target sampling frame can be understood as the image content corresponding to the corrected target moving object. The target weight can be understood as the weight of the influence of the target moving object as a newly added training sample on the network parameters of the false detection discrimination model during the training of the false detection discrimination model using the updated labeled sample set. If there are many target moving objects in a certain area of the image, the target weight value of each target moving object therein is small; conversely, if there are few target moving objects in a certain area of the image, the target weight value of each target moving object therein is high.
[0172] The image content and target weight corresponding to the third target sampling frame are added to the initial annotated sample set of the false positive discrimination model to obtain an updated initial annotated sample set. Based on the updated initial annotated sample set, the model parameters of the false positive discrimination model are updated until the model converges, obtaining an updated false positive discrimination model.
[0173] In an embodiment of the present application, by introducing target weights, it is possible to avoid the problem that the updated false detection discrimination model obtained by subsequent training is much more sensitive to certain areas than other areas due to the imbalance in the number of target moving objects in different areas of the image, thereby improving the model performance of the updated false detection discrimination model.
[0174] Among them, obtaining the target weight of the target moving object can include: clustering the target moving objects in each first-level cluster based on the color channel values corresponding to the pixel points in the third target sampling frame to obtain at least one second-level cluster, and each second-level cluster includes at least one target moving object; based on the number of target moving objects in the second-level cluster, determining the cluster weight of each second-level cluster; and determining the target weight of the target moving object according to the cluster weight.
[0175] For the cropped third target sampling frame, each color channel of each pixel in the third target sampling frame can be regarded as a feature, and a clustering algorithm (such as K-means clustering algorithm, spectral clustering algorithm, etc.) is used to calculate the image distance between each pair of the third target sampling frames. Based on the calculated image distance, the target moving objects in each first-level cluster are clustered to obtain at least one second-level cluster.
[0176] The cropped third target sampling frame can also be scaled to reduce its resolution. Each channel of each pixel is then considered a feature, and a clustering algorithm (such as a K-means clustering algorithm or a spectral clustering algorithm) is used to calculate the image distances between each pair of third target sampling frames. The target moving objects in each first-level cluster are then clustered based on the calculated image distances to obtain at least one second-level cluster. Performing clustering after scaling can reduce the amount of computation required.
[0177] Clustering the target moving objects in each first-level cluster is performed based on the color channel values corresponding to the pixel points in the third target sampling frame. This can be understood as a process of subdividing the first-level clusters based on the image features of each third target sampling frame.
[0178] After clustering is complete, the number of samples in each secondary cluster can be counted and fed into a conversion function with a first-order derivative greater than 0 and a second-order derivative less than 0 (e.g., √kx, log(kx+1), where k is a pre-specified parameter) to obtain the cluster weight of each secondary cluster. The target moving objects in the secondary cluster are then weighted based on the cluster weight to obtain the target weight of the target moving object. The target weight of each target moving object is the cluster weight of the secondary cluster to which it belongs divided by the number of samples in the secondary cluster.
[0179] From the above, it can be seen that the embodiment of the present application obtains at least one image to be detected corresponding to the target detection point, and identifies the image to be detected based on the visual detection model to obtain at least one initial moving object; then, the object properties of the initial moving object are verified by the false detection discrimination model to obtain a first verification result, and at least one target moving object is screened out from the initial moving objects based on the first verification result, wherein the first verification result indicates that the object property of the target moving object is a real moving object; then, the background image library corresponding to the target detection point is obtained, and the motion trajectory of the target moving object is detected at the target detection point to obtain a target trajectory video clip; then, based on the target detection image in the target trajectory video clip and the background image in the background image library, the object properties of the target moving object are verified to obtain a second verification result; based on the second verification result, the false detection discrimination model is updated, and the visual detection model and the updated false detection discrimination model are used to perform object recognition. Since this solution introduces a false detection discrimination model based on the visual detection model, the false detection discrimination model can screen the output results of the visual detection model. Afterwards, based on the screened target moving objects, the object attributes of the target moving objects are verified in combination with the background image library corresponding to the target detection points, and the false detection discrimination model is periodically updated according to the verification results. The output results of the visual detection model are then verified using the updated false detection discrimination model. This process can automate the workflow of updating the training samples of the false detection discrimination model and the model iteration of the false detection discrimination model, thereby improving the model performance of the false detection discrimination model, and then improving the accuracy of object recognition and reducing the probability of system false detection.
[0180] The method described in the above embodiment will be further described in detail below with examples.
[0181] In this embodiment, the object recognition device is specifically integrated into an electronic device, the electronic device is a server, and the server is a server.
[0182] Figure 12 Another flow chart of the object recognition method provided by the embodiment of the present application is shown. Figure 12 As shown, an object recognition method, the specific process is as follows:
[0183] 201. The server obtains at least one image to be detected corresponding to a target detection point, and recognizes the image to be detected based on a visual detection model to obtain at least one initial moving object.
[0184] For example, the server can extract at least one candidate moving object from the image to be detected based on a visual detection model; identify the object attributes of the candidate moving object, and filter out at least one initial moving object from the candidate moving objects based on the identification result, and the identification result indicates that the object attributes of the initial moving object are real moving objects.
[0185] 202. The server verifies the object attributes of the initial moving objects using a false positive discrimination model to obtain a first verification result, and selects at least one target moving object from the initial moving objects based on the first verification result.
[0186] For example, the server can use the output of the visual detection model as the input of the false positive discrimination model, and use the false positive discrimination model to verify the object attributes of each initial moving object. If the false positive discrimination model identifies the object attributes of the initial moving object as a real moving object, the initial moving object is used as the target moving object; conversely, if the false positive discrimination model identifies the object attributes of the initial moving object as a false moving object, the initial moving object is screened out.
[0187] 203. The server obtains a background image library corresponding to the target detection point, and detects the motion trajectory of the target moving object at the target detection point to obtain a target trajectory video clip.
[0188] For example, the server can obtain at least one point detection image taken at the target detection point, classify the point detection image, and obtain a blank background detection image and a non-blank background detection image; based on the blank background detection image, generate a background image library corresponding to the target detection point.
[0189] For example, the server can compare the number of blank background detection images with a preset image threshold of the background image library; if the number of blank background detection images is greater than the preset image threshold, determine the first image distance between the blank background detection images in the background image library based on the pixel information of the blank background detection images; based on the first image distance, cluster the blank background detection images to obtain a set of blank background images equal to the preset image threshold, each blank background image set including at least one blank background detection image; select a blank background detection image from each blank background image set to obtain a background image library.
[0190] 204. The server obtains boundary coordinate information corresponding to an initial position area of the target moving object in each target detection image in the target trajectory video segment.
[0191] For example, the server can refer to each video frame in the target trajectory video segment as a target detection image in the target trajectory segment. In each target detection image, a corresponding bounding box is generated based on the area occupied by the target moving object (i.e., the initial position area). Each bounding box corresponds to a piece of boundary coordinate information, thereby representing the position of the target moving object in the target detection image through the boundary coordinate information.
[0192] 205. The server selects a current target detection image of the target moving object from the target detection image based on the boundary coordinate information.
[0193] For example, the server can obtain the boundary coordinate information corresponding to the initial position area of the target moving object in each target detection image, and determine the median boundary coordinates of the target moving object based on all boundary coordinate information; crop the target position area corresponding to the median boundary coordinates in each target detection image, and determine the third image distance between each target detection image and other target detection images based on the pixel information of the target position area; sum the third image distances to obtain the total third image distance between each target detection image and other target detection images; based on the total third image distance, filter out the current target detection image of the target moving object from the target detection image.
[0194] 206. The server searches for a background image corresponding to the background area of the current target detection image from the background image library as the target background image.
[0195] For example, the server can use a visual detection model to identify the current target detection image, obtain at least one moving reference object, and generate a corresponding reference boundary box for each moving reference object; use the area outside the reference boundary box in the current target detection image as the target background area, and generate a preset number of first background sampling frames in the target background area; based on the position information of the target background area, generate a preset number of second background sampling frames in each background image in the background image library; compare the content of the second background sampling frame in each background image with the first background sampling frame to obtain the content similarity between each background image and the current target detection image; based on the content similarity, filter out the target background image from the background image library.
[0196] For example, the server can form a sampling frame pair with a first background sampling frame and a second background sampling frame in the same position; based on the pixel information of the area where each sampling frame pair is located, determine the first average color channel value corresponding to the first background sampling frame and the second average color channel value corresponding to the second background sampling frame; calculate the difference between the first average color channel value and the second average color channel value to obtain the color channel value difference of the sampling frame pair; based on the color channel value differences of all sampling frame pairs, determine the content similarity between each background image and the current target detection image.
[0197] 207. The server verifies the object attributes of the target moving object based on the current target detection image and the target background image to obtain a second verification result.
[0198] For example, the server can crop a first target sampling frame corresponding to the median boundary coordinates from the target background image according to the median boundary coordinates of the target moving object, and crop a second target sampling frame corresponding to the median boundary coordinates from the current target detection image; based on the pixel information of the first target sampling frame and the second target sampling frame, compare the current target detection image with the target background image to obtain a fourth image distance between the current target detection image and the target background image; based on the fourth image distance, verify the object properties of the target moving object to obtain a secondary verification result.
[0199] For example, the server can compare the image distance between the current target detection image and the target background image with a preset threshold; if the fourth image distance is less than the preset threshold, the second verification result is determined to be that the object attribute of the target moving object is a false moving object; if the fourth image distance is not less than the preset threshold, the second verification result is determined to be that the object attribute of the target moving object is a real moving object.
[0200] 208. The server updates the false positive detection model based on the second verification result, and uses the visual detection model and the updated false positive detection model to perform object recognition.
[0201] For example, if the second verification result indicates that the object attribute of the target mobile object is a false mobile object, the server can add the target mobile object to the initial labeled sample set of the false detection discrimination model to obtain an updated labeled sample set; and update the false detection discrimination model based on the updated labeled sample set to obtain an updated false detection discrimination model.
[0202] For example, the server can obtain all target moving objects at the target detection point and the median boundary coordinates corresponding to the target moving objects; cluster the target moving objects based on the regional positions corresponding to the median boundary coordinates to obtain multiple first-level clusters; determine the target median boundary coordinates of the first-level cluster based on the median boundary coordinates corresponding to the target moving objects in each first-level cluster; crop the third target sampling frame corresponding to the target median boundary coordinates from the current target detection image corresponding to the target moving object; obtain the target weight of the target moving object, and add the image content and target weight corresponding to the third target sampling frame to the initial labeled sample set of the false detection discrimination model.
[0203] For example, the server can cluster the target mobile objects in each first-level cluster based on the color channel values corresponding to the pixel points in the third target sampling frame to obtain at least one second-level cluster, and each second-level cluster includes at least one target mobile object; based on the number of target mobile objects in the second-level cluster, determine the cluster weight of each second-level cluster; and determine the target weight of the target mobile object based on the cluster weight.
[0204] From the above, it can be seen that the embodiment of the present application obtains at least one image to be detected corresponding to the target detection point, and identifies the image to be detected based on the visual detection model to obtain at least one initial moving object; then, the object properties of the initial moving object are verified by the false detection discrimination model to obtain a first verification result, and at least one target moving object is screened out from the initial moving objects based on the first verification result, wherein the first verification result indicates that the object property of the target moving object is a real moving object; then, the background image library corresponding to the target detection point is obtained, and the motion trajectory of the target moving object is detected at the target detection point to obtain a target trajectory video clip; then, based on the target detection image in the target trajectory video clip and the background image in the background image library, the object properties of the target moving object are verified to obtain a second verification result; based on the second verification result, the false detection discrimination model is updated, and the visual detection model and the updated false detection discrimination model are used to perform object recognition. Since this solution introduces a false detection discrimination model based on the visual detection model, the false detection discrimination model can screen the output results of the visual detection model. Afterwards, based on the screened target moving objects, the object attributes of the target moving objects are verified in combination with the background image library corresponding to the target detection points, and the false detection discrimination model is periodically updated according to the verification results. The output results of the visual detection model are then verified using the updated false detection discrimination model. This process can automate the workflow of updating the training samples of the false detection discrimination model and the model iteration of the false detection discrimination model, thereby improving the model performance of the false detection discrimination model, and then improving the accuracy of object recognition and reducing the probability of system false detection.
[0205] In order to better implement the above method, an embodiment of the present application also provides an object recognition device, which can be integrated into a network device, such as a server or terminal, and the terminal can include a tablet computer, a laptop computer and / or a personal computer.
[0206] Figure 13 FIG. 1 shows a schematic diagram of the structure of the object recognition device provided in an embodiment of the present application. Figure 13 As shown, the object recognition device may include a visual initial inspection unit 301, a first verification unit 302, a target detection unit 303, a second verification unit 304, and a model updating unit 305, as follows:
[0207] (1) Visual initial inspection unit 301;
[0208] The visual initial inspection unit 301 is used to obtain at least one image to be inspected corresponding to the target detection point, and identify the image to be inspected based on the visual inspection model to obtain at least one initial moving object.
[0209] For example, the visual initial inspection unit 301 can be specifically used to extract at least one candidate moving object from the image to be detected based on a visual detection model; identify the object attributes of the candidate moving object, and filter out at least one initial moving object from the candidate moving objects based on the identification results.
[0210] (2) a first verification unit 302;
[0211] The first verification unit 302 is configured to verify the object attributes of the initial moving objects using a false positive discrimination model, and select at least one target moving object from the initial moving objects based on a first verification result.
[0212] (3) target detection unit 303;
[0213] The target detection unit 303 is used to obtain a background image library corresponding to a target detection point, and detect a motion trajectory of a target moving object at the target detection point to obtain a target trajectory video clip.
[0214] For example, the target detection unit 303 can be specifically used to obtain at least one point detection image taken at the target detection point, classify the point detection image, and obtain a blank background detection image and a non-blank background detection image; based on the blank background detection image, generate a background image library corresponding to the target detection point.
[0215] For example, the target detection unit 303 can be specifically used to compare the number of blank background detection images with a preset image threshold of a background image library; if the number of blank background detection images is greater than the preset image threshold, the first image distance between the blank background detection images in the background image library is determined based on the pixel information of the blank background detection images; based on the first image distance, the blank background detection images are clustered to obtain a set of blank background images equal to the preset image threshold, each blank background image set including at least one blank background detection image; a blank background detection image is selected from each blank background image set to obtain a background image library.
[0216] For example, the target detection unit 303 can be specifically used to pair the blank background detection images in the background image library to obtain at least one set of blank background image pairs; obtain the pixel information corresponding to the two blank background detection images in each blank background image pair; based on the pixel information, determine the color channel value difference between the pixel points corresponding to the same pixel position of the two blank background detection images in the blank background image pair; based on the color channel value difference, determine the first image distance.
[0217] For example, the target detection unit 303 can be specifically used to calculate the second image distance between each blank background detection image and other blank background detection images in each blank background image set based on the pixel information of the blank background detection image; sum the second image distances to obtain the total second image distance between each blank background detection image and other blank background detection images; based on the total second image distance, screen out a blank background detection image from the blank background image set to obtain a background image library.
[0218] (4) a second verification unit 304;
[0219] The second verification unit 304 is configured to verify the object attributes of the target moving object based on the target detection image in the target trajectory video clip and the background image in the background image library to obtain a second verification result.
[0220] For example, the second verification unit 304 can be specifically used to obtain the boundary coordinate information corresponding to the initial position area of the target moving object in each target detection image in the target trajectory video clip; based on the boundary coordinate information, the current target detection image of the target moving object is screened out from the target detection image; the background image corresponding to the background area of the current target detection image is searched from the background image library as the target background image; based on the current target detection image and the target background image, the object properties of the target moving object are verified to obtain a secondary verification result.
[0221] For example, the second verification unit 304 can be specifically used to obtain the boundary coordinate information corresponding to the initial position area of the target moving object in each target detection image, and determine the median boundary coordinates of the target moving object based on all boundary coordinate information; crop the target position area corresponding to the median boundary coordinates in each target detection image, and determine the third image distance between each target detection image and other target detection images based on the pixel information of the target position area; sum the third image distances to obtain the total third image distance between each target detection image and other target detection images; based on the total third image distance, filter out the current target detection image of the target moving object from the target detection image.
[0222] For example, the second verification unit 304 may be specifically configured to compare all boundary coordinate information to obtain coordinate similarity; if the coordinate similarity is greater than a preset similarity, the median boundary coordinate of the target moving object is determined based on all boundary coordinate information.
[0223] For example, the second verification unit 304 can be specifically used to use a visual detection model to identify the current target detection image, obtain at least one moving reference object, and generate a corresponding reference boundary box for each moving reference object; use the area outside the reference boundary box in the current target detection image as the target background area, and generate a preset number of first background sampling frames in the target background area; based on the position information of the target background area, generate a preset number of second background sampling frames in each background image in the background image library; compare the content of the second background sampling frame in each background image with the first background sampling frame to obtain the content similarity between each background image and the current target detection image; based on the content similarity, filter out the target background image from the background image library.
[0224] For example, the second verification unit 304 can be specifically used to form a sampling frame pair with the first background sampling frame and the second background sampling frame in the same position; based on the pixel information of the area where each sampling frame pair is located, determine the first average color channel value corresponding to the first background sampling frame and the second average color channel value corresponding to the second background sampling frame; calculate the difference between the first average color channel value and the second average color channel value to obtain the color channel value difference of the sampling frame pair; based on the color channel value differences of all sampling frame pairs, determine the content similarity between each background image and the current target detection image.
[0225] For example, the second verification unit 304 can be specifically used to crop a first target sampling frame corresponding to the median boundary coordinates from the target background image according to the median boundary coordinates of the target moving object, and crop a second target sampling frame corresponding to the median boundary coordinates from the current target detection image; based on the pixel information of the first target sampling frame and the second target sampling frame, the current target detection image is compared with the target background image to obtain a fourth image distance between the current target detection image and the target background image; based on the fourth image distance, the object properties of the target moving object are verified to obtain a secondary verification result.
[0226] For example, the second verification unit 304 can be specifically used to compare the image distance between the current target detection image and the target background image with a preset threshold; if the fourth image distance is less than the preset threshold, the second verification result is determined to be that the object attribute of the target moving object is a false moving object; if the fourth image distance is not less than the preset threshold, the second verification result is determined to be that the object attribute of the target moving object is a real moving object.
[0227] (5) Model updating unit 305;
[0228] The model updating unit 305 is configured to update the false positive discrimination model based on the second verification result, and perform object recognition using the visual detection model and the updated false positive discrimination model.
[0229] For example, the model updating unit 305 can be specifically used to add the target moving object to the initial labeled sample set of the false detection discrimination model if the second verification result indicates that the object attribute of the target moving object is a false moving object, to obtain an updated labeled sample set; and update the false detection discrimination model based on the updated labeled sample set to obtain an updated false detection discrimination model.
[0230] For example, the model updating unit 305 can be specifically used to obtain all target moving objects at the target detection point and the median boundary coordinates corresponding to the target moving objects; cluster the target moving objects based on the regional position corresponding to the median boundary coordinates to obtain multiple first-level clusters, each first-level cluster including at least one target moving object; determine the target median boundary coordinates of the first-level cluster based on the median boundary coordinates corresponding to the target moving objects in each first-level cluster; crop a third target sampling frame corresponding to the target median boundary coordinates from the current target detection image corresponding to the target moving object; obtain the target weight of the target moving object, and add the image content and target weight corresponding to the third target sampling frame to the initial labeled sample set of the false detection discrimination model.
[0231] For example, the model updating unit 305 can be specifically used to cluster the target moving objects in each first-level cluster based on the color channel values corresponding to the pixel points in the third target sampling frame to obtain at least one second-level cluster; determine the cluster weight of each second-level cluster based on the number of target moving objects in the second-level cluster; and determine the target weight of the target moving object based on the cluster weight.
[0232] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can be found in the previous method embodiments and will not be repeated here.
[0233] From the above, it can be seen that in the embodiment of the present application, the visual initial inspection unit 301 obtains at least one image to be detected corresponding to the target detection point, and identifies the image to be detected based on the visual detection model to obtain at least one initial moving object; then, the first verification unit 302 uses the false detection discrimination model to verify the object properties of the initial moving object to obtain a first verification result, and screens out at least one target moving object from the initial moving object based on the first verification result, wherein the first verification result indicates that the object property of the target moving object is a real moving object; then, the target detection unit 303 obtains the background image library corresponding to the target detection point, and detects the motion trajectory of the target moving object at the target detection point to obtain a target trajectory video clip; then, the second verification unit 304 verifies the object properties of the target moving object based on the target detection image in the target trajectory video clip and the background image in the background image library to obtain a second verification result; the model updating unit 305 then updates the false detection discrimination model based on the second verification result, and uses the visual detection model and the updated false detection discrimination model to perform object recognition. Since this solution introduces a false detection discrimination model based on the visual detection model, the false detection discrimination model can screen the output results of the visual detection model. Afterwards, based on the screened target moving objects, the object attributes of the target moving objects are verified in combination with the background image library corresponding to the target detection points, and the false detection discrimination model is periodically updated according to the verification results. The output results of the visual detection model are then verified using the updated false detection discrimination model. This process can automate the workflow of updating the training samples of the false detection discrimination model and the model iteration of the false detection discrimination model, thereby improving the model performance of the false detection discrimination model, and then improving the accuracy of object recognition and reducing the probability of system false detection.
[0234] The present application also provides an electronic device, such as Figure 14 , which shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:
[0235] The electronic device may include one or more processing core processors 401, one or more computer-readable storage media memories 402, a power supply 403, an input unit 404 and other components. Those skilled in the art will understand that Figure 14 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
[0236] Processor 401 is the control center of the electronic device. It connects all parts of the electronic device using various interfaces and circuits. It performs various functions of the electronic device and processes data by running or executing software programs and / or modules stored in memory 402 and accessing data stored in memory 402. Optionally, processor 401 may include one or more processing cores. Preferably, processor 401 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 401.
[0237] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly 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 (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0238] The electronic device also includes a power supply 403 for supplying power to various components. Preferably, the power supply 403 can be logically connected to the processor 401 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 403 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0239] The electronic device may further include an input unit 404, which may be configured to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0240] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402 to implement various functions as follows:
[0241] At least one image to be detected corresponding to the target detection point is obtained, and based on the visual detection model, the image to be detected is identified to obtain at least one initial moving object; then, the object properties of the initial moving object are verified by using the false detection discrimination model to obtain a first verification result, and at least one target moving object is screened out from the initial moving objects based on the first verification result, wherein the first verification result indicates that the object property of the target moving object is a real moving object; then, a background image library corresponding to the target detection point is obtained, and the motion trajectory of the target moving object is detected at the target detection point to obtain a target trajectory video clip; then, based on the target detection image in the target trajectory video clip and the background image in the background image library, the object properties of the target moving object are verified to obtain a second verification result; based on the second verification result, the false detection discrimination model is updated, and the visual detection model and the updated false detection discrimination model are used to perform object recognition.
[0242] For example, the electronic device can obtain at least one image to be detected corresponding to the target detection point, and identify the image to be detected based on the visual detection model to obtain at least one initial moving object; use the false detection discrimination model to verify the object properties of the initial moving object to obtain a first verification result, and screen out at least one target moving object from the initial moving objects based on the first verification result; obtain the background image library corresponding to the target detection point, and detect the motion trajectory of the target moving object at the target detection point to obtain a target trajectory video clip; obtain the boundary coordinate information corresponding to the initial position area of the target moving object in each target detection image in the target trajectory video clip; based on the boundary coordinate information, screen out the current target detection image of the target moving object from the target detection image; search the background image corresponding to the background area of the current target detection image from the background image library as the target background image; verify the object properties of the target moving object based on the current target detection image and the target background image to obtain a second verification result; based on the second verification result, update the false detection discrimination model, and use the visual detection model and the updated false detection discrimination model to perform object recognition, and so on.
[0243] The specific implementation of the above operations can be found in the previous embodiments and will not be described in detail here.
[0244] From the above, it can be seen that the embodiment of the present application obtains at least one image to be detected corresponding to the target detection point, and identifies the image to be detected based on the visual detection model to obtain at least one initial moving object; then, the object properties of the initial moving object are verified by the false detection discrimination model to obtain a first verification result, and at least one target moving object is screened out from the initial moving objects based on the first verification result, wherein the first verification result indicates that the object property of the target moving object is a real moving object; then, the background image library corresponding to the target detection point is obtained, and the motion trajectory of the target moving object is detected at the target detection point to obtain a target trajectory video clip; then, based on the target detection image in the target trajectory video clip and the background image in the background image library, the object properties of the target moving object are verified to obtain a second verification result; based on the second verification result, the false detection discrimination model is updated, and the visual detection model and the updated false detection discrimination model are used to perform object recognition. Since this solution introduces a false detection discrimination model based on the visual detection model, the false detection discrimination model can screen the output results of the visual detection model. Afterwards, based on the screened target moving objects, the object attributes of the target moving objects are verified in combination with the background image library corresponding to the target detection points, and the false detection discrimination model is periodically updated according to the verification results. The output results of the visual detection model are then verified using the updated false detection discrimination model. This process can automate the workflow of updating the training samples of the false detection discrimination model and the model iteration of the false detection discrimination model, thereby improving the model performance of the false detection discrimination model, and then improving the accuracy of object recognition and reducing the probability of system false detection.
[0245] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0246] To this end, an embodiment of the present application provides a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute the steps of any object recognition method provided in an embodiment of the present application. For example, the instructions can execute the following steps:
[0247] At least one image to be detected corresponding to the target detection point is obtained, and based on the visual detection model, the image to be detected is identified to obtain at least one initial moving object; then, the object properties of the initial moving object are verified by using the false detection discrimination model to obtain a first verification result, and at least one target moving object is screened out from the initial moving objects based on the first verification result, wherein the first verification result indicates that the object property of the target moving object is a real moving object; then, a background image library corresponding to the target detection point is obtained, and the motion trajectory of the target moving object is detected at the target detection point to obtain a target trajectory video clip; then, based on the target detection image in the target trajectory video clip and the background image in the background image library, the object properties of the target moving object are verified to obtain a second verification result; based on the second verification result, the false detection discrimination model is updated, and the visual detection model and the updated false detection discrimination model are used to perform object recognition.
[0248] For example, at least one image to be detected corresponding to the target detection point is obtained, and based on the visual detection model, the image to be detected is identified to obtain at least one initial moving object; the object properties of the initial moving object are verified using a false detection discrimination model to obtain a first verification result, and at least one target moving object is screened out from the initial moving objects based on the first verification result; a background image library corresponding to the target detection point is obtained, and the motion trajectory of the target moving object is detected at the target detection point to obtain a target trajectory video clip; boundary coordinate information corresponding to the initial position area of the target moving object in each target detection image in the target trajectory video clip is obtained; based on the boundary coordinate information, the current target detection image of the target moving object is screened out from the target detection image; a background image corresponding to the background area of the current target detection image is searched from the background image library as the target background image; based on the current target detection image and the target background image, the object properties of the target moving object are verified to obtain a second verification result; based on the second verification result, the false detection discrimination model is updated, and the visual detection model and the updated false detection discrimination model are used to perform object recognition, and so on.
[0249] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0250] The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0251] Since the instructions stored in the computer-readable storage medium can execute the steps in any object recognition method provided in the embodiments of the present application, the beneficial effects that can be achieved by any object recognition method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0252] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in various optional implementations of the aforementioned data access aspects.
[0253] The above is a detailed introduction to an object recognition method, device and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.
Claims
1. A method for object recognition, characterized in that: include: Acquire at least one image to be detected corresponding to the target detection point, and identify the image to be detected based on the visual detection model to obtain at least one initial moving object; Verifying the object attribute of the initial moving object using a false detection discrimination model to obtain a first verification result, and screening at least one target moving object from the initial moving objects based on the first verification result, wherein the first verification result indicates that the object attribute of the target moving object is a real moving object; Acquire a background image library corresponding to the target detection point, and detect the motion trajectory of the target moving object at the target detection point to obtain a target trajectory video clip; Verifying the object attributes of the target moving object based on the target detection image in the target trajectory video clip and the background image in the background image library to obtain a second verification result; Based on the second verification result, the false detection discrimination model is updated, and the visual detection model and the updated false detection discrimination model are used to perform object recognition.
2. The object recognition method according to claim 1, wherein: The step of identifying the image to be detected based on the visual detection model to obtain at least one initial moving object includes: extracting at least one candidate moving object from the image to be detected based on the visual detection model; The object attributes of the candidate mobile objects are identified, and at least one initial mobile object is screened out from the candidate mobile objects based on the identification result, wherein the identification result indicates that the object attribute of the initial mobile object is a real mobile object.
3. The object recognition method according to claim 1, wherein: The obtaining of a background image library corresponding to the target detection point includes: Acquire at least one point detection image captured at the target detection point, Classifying the point detection images to obtain blank background detection images and non-blank background detection images, wherein the blank background detection images do not include the real moving object; Based on the blank background detection image, a background image library corresponding to the target detection point is generated.
4. The object recognition method according to claim 3, wherein: The step of generating a background image library corresponding to the target detection point based on the blank background detection image includes: Comparing the number of images of the blank background detection image with a preset image threshold of the background image library; If the number of the blank background detection images is greater than the preset image threshold, determining a first image distance between the blank background detection images in the background image library based on pixel information of the blank background detection images; Clustering the blank background detection images based on the first image distance to obtain a set of blank background images equal to the preset image threshold, each of the blank background image sets including at least one blank background detection image; A blank background detection image is selected from each of the blank background image sets to obtain the background image library.
5. The object recognition method according to claim 4, wherein: The determining, based on pixel information of the blank background detection image, a first image distance between blank background detection images in the background image library comprises: Pairing the blank background detection images in the background image library to obtain at least one set of blank background image pairs; Obtaining pixel information corresponding to each of the two blank background detection images in each blank background image pair, wherein the pixel information includes color channel values corresponding to the pixel points; Determining, based on the pixel information, a color channel value difference between pixel points corresponding to the same pixel position in two blank background detection images in the blank background image pair; The first image distance is determined based on the color channel value difference.
6. The object recognition method according to claim 4, wherein: The step of selecting a blank background detection image from each blank background image set to obtain the background image library comprises: Calculating a second image distance between each blank background detection image and other blank background detection images in each blank background image set based on pixel information of the blank background detection image; Summing up the second image distances to obtain a total second image distance between each blank background detection image and other blank background detection images; Based on the total distance of the second image, a blank background detection image is screened out from the blank background image set to obtain the background image library.
7. The object recognition method according to claim 1, wherein: The verifying the object attribute of the target moving object based on the target detection image in the target trajectory video clip and the background image in the background image library to obtain a second verification result includes: Obtaining boundary coordinate information corresponding to an initial position area of the target moving object in each target detection image in the target trajectory video segment; Based on the boundary coordinate information, filtering out a current target detection image of the target moving object from the target detection image; Searching for a background image corresponding to the background area of the current target detection image from the background image library as the target background image; Based on the current target detection image and the target background image, the object attribute of the target moving object is verified to obtain a second verification result.
8. The object recognition method according to claim 7, wherein: The step of filtering out the current target detection image of the target moving object from the target detection image based on the boundary coordinate information includes: Acquire boundary coordinate information corresponding to the initial position area of the target moving object in each of the target detection images, and determine the median boundary coordinate of the target moving object based on all boundary coordinate information; cropping a target location region corresponding to the median boundary coordinates in each target detection image, and determining a third image distance between each target detection image and other target detection images based on pixel information of the target location region; Summing the third image distances to obtain a total third image distance between each target detection image and other target detection images; The current target detection image of the target moving object is filtered out from the target detection images based on the third image total distance.
9. The object recognition method according to claim 8, wherein: The determining of the median boundary coordinates of the target moving object based on all boundary coordinate information includes: Compare all boundary coordinate information to obtain coordinate similarity; If the coordinate similarity is greater than a preset similarity, the median boundary coordinate of the target moving object is determined based on all boundary coordinate information.
10. The object recognition method according to claim 7, wherein: The step of searching the background image library for a background image having the greatest similarity to the background area of the current target detection image as the target background image includes: Using the visual detection model to identify the current target detection image, obtain at least one moving reference object, and generate a corresponding reference bounding box for each moving reference object; Taking an area outside the reference boundary box in the current target detection image as the target background area, and generating a preset number of first background sampling frames in the target background area; generating a preset number of second background sampling frames in each background image in the background image library based on the position information of the target background area, where the number of the second background sampling frames is the same as the number of the first background sampling frames; Comparing the content of the second background sampling frame in each of the background images with the first background sampling frame to obtain a content similarity between each of the background images and the current target detection image; Based on the content similarity, the target background image is screened out from the background image library.
11. The object recognition method according to claim 10, wherein: Comparing the content of the second background sampling frame in each of the background images with the first background sampling frame to obtain the content similarity between each of the background images and the current target detection image includes: The first background sampling frame and the second background sampling frame at the same position form a sampling frame pair; Determining, based on pixel information of the area where each sampling frame pair is located, a first average color channel value corresponding to the first background sampling frame and a second average color channel value corresponding to the second background sampling frame; Calculating a difference between the first average color channel value and the second average color channel value to obtain a color channel value difference of the sampling frame pair; Based on the color channel value differences of all sampling frame pairs, the content similarity between each background image and the current target detection image is determined.
12. The object recognition method according to claim 7, wherein: The verifying the object attribute of the target moving object based on the current target detection image and the target background image to obtain a second verification result includes: According to the median boundary coordinates of the target moving object, a first target sampling frame corresponding to the median boundary coordinates is cropped from the target background image, and a second target sampling frame corresponding to the median boundary coordinates is cropped from the current target detection image; Comparing the current target detection image with the target background image based on pixel information of the first target sampling frame and the second target sampling frame to obtain a fourth image distance between the current target detection image and the target background image; The object attribute of the target moving object is verified according to the fourth image distance to obtain a second verification result.
13. The object recognition method according to claim 12, wherein: The verifying the object attribute of the target moving object according to the fourth image distance to obtain a second verification result includes: Comparing the image distance between the current target detection image and the target background image with a preset threshold; If the fourth image distance is less than the preset threshold, determining that the second verification result is that the object attribute of the target moving object is a false moving object; If the fourth image distance is not less than the preset threshold, it is determined that the second verification result indicates that the object attribute of the target moving object is a real moving object.
14. The object recognition method according to claim 1, wherein: The updating of the false detection discrimination model based on the second verification result includes: If the second verification result indicates that the object attribute of the target moving object is a false moving object, adding the target moving object to the initial labeled sample set of the false detection discrimination model to obtain an updated labeled sample set; The false positive discrimination model is updated based on the updated labeled sample set to obtain the updated false positive discrimination model.
15. The object recognition method according to claim 14, wherein: The step of adding the target moving object to the initial labeled sample set of the false detection discrimination model includes: Obtaining all target moving objects at the target detection point and the median boundary coordinates corresponding to the target moving objects; Clustering the target moving object based on the region position corresponding to the median boundary coordinates to obtain a plurality of first-level clusters, each of the first-level clusters including at least one target moving object; Determining the target median boundary coordinates of the first-level cluster based on the median boundary coordinates corresponding to the target moving object in each of the first-level clusters; Cutting out a third target sampling frame corresponding to the target median boundary coordinates from the current target detection image corresponding to the target moving object; A target weight of the target moving object is obtained, and the image content corresponding to the third target sampling frame and the target weight are added to the initial labeled sample set of the false detection discrimination model.
16. The object recognition method according to claim 15, wherein: The obtaining of the target weight of the target moving object includes: Clustering the target moving object in each of the first-level clusters based on color channel values corresponding to the pixels in the third target sampling frame to obtain at least one second-level cluster, each of the second-level clusters including at least one target moving object; determining a cluster weight of each of the secondary clusters based on the number of the target mobile objects in the secondary clusters; A target weight of the target moving object is determined according to the cluster weight.
17. An object recognition device, characterized in that: include: A visual initial inspection unit is used to obtain at least one image to be inspected corresponding to a target detection point, and identify the image to be inspected based on a visual inspection model to obtain at least one initial moving object; a first verification unit, configured to verify the object attributes of the initial moving objects using a false positive discrimination model, and select at least one target moving object from the initial moving objects based on a first verification result, wherein the first verification result indicates that the object attributes of the target moving object are real moving objects; A target detection unit is used to obtain a background image library corresponding to the target detection point, and detect the motion trajectory of the target moving object at the target detection point to obtain a target trajectory video clip; a second verification unit, configured to verify the object attributes of the target moving object based on the target detection image in the target trajectory video clip and the background image in the background image library, to obtain a second verification result; A model updating unit is used to update the false positive discrimination model based on the second verification result, and use the visual detection model and the updated false positive discrimination model to perform object recognition.
18. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores an application program, and the processor is configured to run the application program in the memory to execute the steps of the object recognition method according to any one of claims 1 to 16.
19. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the object recognition method according to any one of claims 1 to 16 are implemented.
20. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the object recognition method according to any one of claims 1 to 16.