Abnormality detection method and device, computer equipment and computer readable storage medium

By acquiring the image to be detected and the first dictionary, determining the rotation angle of the detection box of the object to be detected, and performing abnormality detection based on the reference rotation angle, the problem of inaccurate rotation angle prediction in 3D object detection is solved, and efficient and accurate abnormality detection effect is achieved.

CN119942072APending Publication Date: 2025-05-06UBTECH ROBOTICS CORP LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411999184.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the prior art, the rotation angle prediction of 3D object detection is inaccurate and there is a lack of effective abnormality detection methods.

Method used

By acquiring the image to be detected and the first dictionary, the rotation angle of the detection box of the object to be detected is determined, and abnormal detection is performed based on the reference rotation angle, thereby improving the accuracy of the rotation angle.

Benefits of technology

It realizes efficient and accurate abnormal detection of rotation angles, identifying whether the rotation angle is normal, and providing accurate data support for applications such as autonomous driving and navigation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119942072A_ABST
    Figure CN119942072A_ABST
Patent Text Reader

Abstract

The invention provides an anomaly detection method and device, computer equipment and a computer readable storage medium. The method comprises the following steps: acquiring a to-be-detected image, and determining a first identifier of a to-be-detected object included in the to-be-detected image and a first rotation angle of a detection frame of the to-be-detected object; a first dictionary is obtained, the first dictionary comprises M second identifiers and a second rotation angle set corresponding to each second identifier, and the second rotation angle set comprises second rotation angles corresponding to different timestamps; determining a third rotation angle set corresponding to the first identifier from the M second rotation angle sets; when the element number of the third rotation angle set is greater than a first number threshold value, determining a reference rotation angle corresponding to the first identifier from the third rotation angle set; and performing anomaly detection on the first rotation angle based on the reference rotation angle to obtain a detection result of the first rotation angle. According to the invention, the anomaly detection of the rotation angle can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision, and in particular to an anomaly detection method, apparatus, computer device, and computer-readable storage medium. Background Art

[0002] 3D object detection is an important task in the field of computer vision. The main goal of 3D object detection is to detect and locate objects in three-dimensional space and accurately obtain geometric information such as the size, position and orientation of the object. 3D object detection can detect the actual size and orientation of the object, which helps to fully understand the scene. For example, in the field of autonomous driving, 3D object detection can provide vehicles with obstacle recognition, motion prediction and environmental understanding; in the field of robotics, 3D object detection can achieve more accurate environmental interaction and navigation, help robots avoid dynamic and static obstacles, and provide input information for the robot arm to plan the grasping path by detecting the position and orientation of the object. By detecting the position changes of multiple targets, it helps the robot to adjust the path and task in time.

[0003] In the related art, there is a problem of low accuracy of detection results for 3D object detection. Summary of the invention

[0004] The embodiments of the present application provide an anomaly detection method, apparatus, computer device, and computer-readable storage medium, which can improve the accuracy and success rate of flattening.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] The present invention provides an abnormality detection method, which includes:

[0007] Acquire an image to be detected, and determine a first identifier of an object to be detected included in the image to be detected and a first rotation angle of a detection frame of the object to be detected;

[0008] Obtain a first dictionary, wherein the first dictionary includes M second identifiers and a second rotation angle set corresponding to each second identifier, wherein the second rotation angle set includes second rotation angles corresponding to different timestamps;

[0009] Determine a third rotation angle set corresponding to the first identifier from the M second rotation angle sets;

[0010] When the number of elements in the third rotation angle set is greater than a first number threshold, determining a reference rotation angle corresponding to the first identifier from the third rotation angle set;

[0011] An abnormality detection is performed on the first rotation angle based on the reference rotation angle to obtain a detection result of the first rotation angle.

[0012] The present application provides an abnormality detection device, the device comprising:

[0013] A first acquisition module, used for acquiring an image to be detected, and determining a first identifier of an object to be detected included in the image to be detected and a first rotation angle of a detection frame of the object to be detected;

[0014] A second acquisition module is used to acquire a first dictionary, wherein the first dictionary includes M second identifiers and a second rotation angle set corresponding to each second identifier, wherein the second rotation angle set includes second rotation angles corresponding to different timestamps;

[0015] A first determining module, configured to determine a third rotation angle set corresponding to the first identifier from the M second rotation angle sets;

[0016] A second determining module, configured to determine a reference rotation angle corresponding to the first identifier from the third rotation angle set when the number of elements in the third rotation angle set is greater than a first number threshold;

[0017] A detection module is used to perform abnormality detection on the first rotation angle based on the reference rotation angle to obtain a detection result of the first rotation angle.

[0018] An embodiment of the present application provides a computer device, including:

[0019] A memory for storing computer executable instructions;

[0020] The processor is used to implement the anomaly detection method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.

[0021] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for causing a processor to execute the anomaly detection method provided in the embodiment of the present application.

[0022] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the anomaly detection method provided in the embodiment of the present application is implemented.

[0023] The embodiments of the present application have the following beneficial effects:

[0024] In an embodiment of the present application, for the first identifier of the object to be detected in the image to be detected, the third rotation angle set corresponding to the first identifier is first determined from the M second rotation angle sets of the first dictionary, and when the number of elements in the third rotation angle set is greater than the first number threshold, the reference rotation angle corresponding to the first identifier is determined in each third rotation angle set of the product. Since the third rotation angle set includes the third rotation angle, that is, when the number of the third rotation angles is greater than the first number threshold, the reference rotation angle corresponding to the first identifier is determined from multiple third rotation angles, thereby improving the accuracy of the reference rotation angle; based on this, the first rotation angle is used to perform anomaly detection on the first rotation angle, wherein the first rotation angle is the rotation angle of the detection frame of the object to be detected in the image to be detected. Since the reference rotation angle has the characteristic of high accuracy, efficient and accurate anomaly detection can be achieved based on the reference rotation angle. Then, the normality of the first rotation angle is identified through anomaly detection, and accurate data support is provided for subsequent applications such as autonomous driving, navigation or augmented reality. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 1 is a schematic diagram of a network architecture of an anomaly detection system 100 provided in an embodiment of the present application;

[0026] Figure 2 is a structural diagram of a server 400 provided in an embodiment of the present application;

[0027] Figure 3 It is a first flow chart of the anomaly detection method provided in an embodiment of the present application;

[0028] Figure 4 is a schematic diagram of a process for determining a reference rotation angle provided in an embodiment of the present application;

[0029] Figure 5 This is a schematic diagram of a process for determining a first angle difference provided in an embodiment of the present application;

[0030] Figure 6 is a second flow chart of the anomaly detection method provided in an embodiment of the present application;

[0031] Fig. 7A It is a display schematic diagram of a detection frame provided in an embodiment of the present application in a laser radar point cloud;

[0032] Figure 7B is a display schematic diagram of a detection frame in a camera image provided by an embodiment of the present application;

[0033] Fig. 8A This is a display schematic diagram of a detection frame with a correct rotation angle provided by an embodiment of the present application;

[0034] Figure 8B This is a display schematic diagram of a detection frame with an incorrect rotation angle provided in an embodiment of the present application;

[0035] Fig. 9 It is a schematic diagram showing the angle distribution value of the detection frame provided in an embodiment of the present application.

[0036] It should be pointed out that the above-mentioned "first" and "second" are only used to distinguish different solutions, and do not represent the degree of superiority or inferiority of the solutions or the priority in the implementation process. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0038] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0039] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0040] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0041] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0042] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.

[0043] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0044] 1) 3D Object Detection is based on object detection and not only identifies the position of the object, but also includes the three-dimensional spatial information of the object, such as depth, height, etc. "3D Object Detection" includes recognition and positioning, depth information and the three-dimensional form of the object. Among them, recognition and positioning refers to identifying the object in three-dimensional space and determining the position and size of the object; in addition to the x and y coordinates in the two-dimensional image, it is also necessary to infer the z coordinate of each object, that is, the depth information, that is, the distance of the object from the camera.

[0045] 3D object detection can be applied to scenarios such as autonomous driving, robot navigation, augmented reality or virtual reality. The implementation method of 3D object detection usually involves deep learning technology, which can use convolutional neural networks (CNN) or other neural network architectures to extract features from images or point cloud data, and combine multiple sensor data (such as radar, lidar, etc.) to improve the accuracy of detection.

[0046] 2) 3D multi-target tracking refers to the process of simultaneously tracking multiple dynamic targets in three-dimensional space. 3D multi-target tracking includes not only the position change of the target in the horizontal direction (x, y coordinates), but also the depth change in the vertical direction (z coordinate). 3D multi-target tracking involves three-dimensional information, multiple targets, real-time, tracking algorithm, real-time, data source and other key points.

[0047] The application areas of 3D multi-target tracking include but are not limited to autonomous driving, robotics, video surveillance, virtual reality and augmented reality. In the above application areas, accurate three-dimensional tracking is crucial for understanding the scene and making decision support.

[0048] 3) Detection box: In 3D object detection, a detection box is a spatial representation that describes the position, size, and orientation of an object in three-dimensional space. For example, a detection box is a three-dimensional cuboid (box) that distinguishes the object from the environment and helps with subsequent perception, tracking, and planning tasks.

[0049] A 3D detection box is a geometric shape used to represent the boundary of a target object. Its purpose is to accurately describe the position, size, and orientation of the target in three-dimensional space. The parameters of the detection box are position, dimensions, orientation, category, and confidence. Among them, the position is used to describe the coordinates of the center point of the target in three-dimensional space, and the position is usually expressed in the world coordinate system or the sensor coordinate system. The dimensions represent the length, width, and height of the detection box, corresponding to (l, w, h), respectively, describing the range of the object in three axes. The orientation is used to describe the rotation angle of the detection box, usually expressed as the yaw angle (Yaw) around the vertical axis (Z axis). The detection box also contains object category labels, such as vehicles, pedestrians, bicycles, etc. The confidence score of the detection box is used to characterize the degree of trustworthiness of the model in the detection results.

[0050] The main function of the 3D detection frame is to provide accurate spatial positioning information for the target object. Therefore, the 3D detection frame can be used for object perception, collision detection and obstacle avoidance, multi-target tracking, and behavior prediction.

[0051] In three-dimensional space, the 3D detection box is usually displayed in the form of a transparent wireframe to intuitively view the position and boundaries of the object. The 3D detection box consists of 8 vertices, which define the boundaries of the cuboid, and the connections between the vertices form the boundary lines of the detection box.

[0052] A 3D object detection box is a cuboid that describes the boundary of a target object in three-dimensional space. It is used to accurately characterize the position, size, and orientation of the target. The 3D object detection box is the core output in the three-dimensional object detection task, providing the necessary geometric information for subsequent tasks in application scenarios such as autonomous driving and robot navigation.

[0053] 4) Angle of the detection box. In 3D object detection, the angle of the detection box refers to the rotation direction of the predicted 3D bounding box relative to a reference coordinate system. This angle describes the orientation of the bounding box and is usually used to represent the deflection of the object in the horizontal direction (such as the direction of travel of a vehicle) and other possible rotations.

[0054] In general, the detection frame angles may include: horizontal rotation angle (Yaw), pitch angle (Pitch) and roll angle (Roll). Among them, the horizontal rotation angle (Yaw) represents the rotation of the object around the vertical axis (usually the z-axis); in autonomous driving and robotics scenarios, Yaw is the most commonly used angle because most objects (such as vehicles, pedestrians) mainly move or position on the horizontal plane; Yaw is in radians (radians) or degrees (degrees), and the range is usually (-π, π) or (0, 2π). The pitch angle (Pitch) represents the rotation of the object around the horizontal axis (usually the y-axis), which is used to describe whether the object is tilted up and down (such as an airplane, a vehicle going up and down a slope). The roll angle (Roll) represents the rotation of the object around another horizontal axis (usually the x-axis), which describes whether the object has tilted (such as a dumped cargo box or a vehicle overturning).

[0055] The angle of the detection box helps to more accurately describe the direction and position of the object in space. The bounding box not only needs to tightly wrap the object, but also needs to match the object's true direction, such as the front and rear direction of the vehicle. With the angle information, the algorithm can distinguish the direction of movement and stationary state of the object, enhancing the semantic understanding of the scene. The angle of the detection box can provide accurate input for downstream tasks such as trajectory prediction or behavior analysis.

[0056] 5) Rotation angle refers to the direction of the detection box in 3D space used in 3D object detection, usually indicating the rotation information of the detection box relative to a reference coordinate system. The rotation angle of the detection box usually refers to the degree of deflection of the main axis direction of the object relative to the z-axis.

[0057] In order to better understand the anomaly detection method provided in the embodiments of the present application, the related art and its existing shortcomings are first described.

[0058] In the related technologies, although 3D target detection has made significant progress in many fields, learning the rotation angle of an object also faces great difficulties, which leads to the problem of inaccurate rotation angle prediction. In the related technologies, the predicted rotation angle is directly used, and no abnormality detection is performed on the rotation angle. In other words, the related technologies lack an abnormality detection method for the rotation angle.

[0059] The embodiments of the present application provide an abnormality detection method, apparatus, computer equipment, and computer-readable storage medium, which can realize abnormality detection of rotation angles. The exemplary application of the computer equipment provided by the embodiments of the present application is described below. The computer equipment provided by the embodiments of the present application can be implemented as various types of terminals such as laptops, tablet computers, desktop computers, set-top boxes, smart phones, smart speakers, smart watches, smart TVs, unmanned vehicles, drones, smart robots, aircraft, and robotic arms, and can also be implemented as servers. Below, an exemplary application when the computer equipment is implemented as a server will be described.

[0060] See also Figure 1 , Figure 1 It is a schematic diagram of the network architecture of the anomaly detection system 100 provided in an embodiment of the present application. To support an anomaly detection application, the terminal 200 is connected to the server 400 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0061] The terminal 200 is used to receive a collection instruction for an object to be detected, collect an image to be detected, and send the image to be detected to the server 400, and the server 400 is used to determine the first identifier of the object to be detected included in the image to be detected and the first rotation angle of the detection frame of the object to be detected; obtain a first dictionary, the first dictionary includes M second identifiers, and a second rotation angle set corresponding to each second identifier, and the second rotation angle set includes second rotation angles corresponding to different timestamps; determine the third rotation angle set corresponding to the first identifier from the M second rotation angle sets; when the number of elements in the third rotation angle set is greater than the first number threshold, determine the reference rotation angle corresponding to the first identifier from the third rotation angle set; perform anomaly detection on the first rotation angle based on the reference rotation angle to obtain the detection result of the first rotation angle. The server 400 can also return the detection result to the terminal 200 so that the terminal 200 displays the detection result. Taking the terminal 200 as an unmanned vehicle as an example, the terminal 200 can also perform path planning based on the detection result.

[0062] In an embodiment of the present application, the server 400 determines the third rotation angle set corresponding to the first identifier from the M second rotation angle sets of the first dictionary for the first identifier in the image to be detected, and when the number of elements in the third rotation angle set is greater than the first number threshold, the product determines the reference rotation angle corresponding to the first identifier in each third rotation angle set. Since the third rotation angle set includes the third rotation angle, that is, when the number of the third rotation angles is greater than the first number threshold, the reference rotation angle corresponding to the first identifier is determined from multiple third rotation angles, thereby improving the accuracy of the reference rotation angle; based on this, the first rotation angle is used to perform anomaly detection on the first rotation angle, wherein the first rotation angle is the rotation angle of the detection frame of the object to be detected in the image to be detected. Since the reference rotation angle has the characteristic of high accuracy, efficient and accurate anomaly detection can be achieved based on the reference rotation angle. Then, the normality of the first rotation angle is identified through anomaly detection, and accurate data support is provided for subsequent applications such as autonomous driving, navigation or augmented reality.

[0063] In some embodiments, when an image acquisition module is deployed on the server 400, the server 400 can acquire the image to be detected based on its own image acquisition module.

[0064] In some embodiments, the server 400 may 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 databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0065] See also Figure 2 , Figure 2 is a schematic diagram of the structure of the server 400 provided in an embodiment of the present application, Figure 2 The server 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the server 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .

[0066] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0067] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0068] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0069] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0070] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0071] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0072] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;

[0073] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);

[0074] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.

[0075] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 The abnormality detection device 455 stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., and includes the following software modules: a first acquisition module 4551, a second acquisition module 4552, a first determination module 4553, a second determination module 4554 and a detection module 4555. These modules are logical, and therefore can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.

[0076] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the anomaly detection method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC), DSP, programmable logic device (Programmable Logic Device, PLD), complex programmable logic device (Complex Programmable Logic Device, CPLD), field programmable gate array (Field-Programmable Gate Array, FPGA) or other electronic components.

[0077] In some embodiments, the server can implement the anomaly detection method provided in the embodiment of the present application by running various computer executable instructions or computer programs. For example, computer executable instructions can be commands, machine instructions or software instructions at the microprogram level. The computer program can be a native program or software module in the operating system; it can be a local (Native) application (APPlication, APP), that is, a program that needs to be installed in the operating system to run, such as anomaly detection APP, target recognition APP; it can also be a small program that can be embedded in any APP, that is, a program that can be run only by downloading it to a browser environment. In short, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form.

[0078] The anomaly detection method provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the server provided in the embodiment of the present application.

[0079] The following describes the anomaly detection method provided by the embodiment of the present application. As mentioned above, the computer device implementing the anomaly detection method of the embodiment of the present application can be a terminal, a server, or a combination of the two. Therefore, the execution subject of each step will not be repeatedly described below.

[0080] It should be noted that in the examples of the abnormality detection method below, the rotation angle is taken as an example of the horizontal rotation angle. Those skilled in the art can apply the abnormality detection method provided in the embodiment of the present application to abnormality detection for other angles such as pitch angle and roll angle based on their understanding of the following. The embodiment of the present application can also be applied to various scenarios, including but not limited to autonomous driving, robot navigation, augmented reality, virtual reality, mixed reality, industrial automation, logistics and warehousing, medical equipment and health industry, home services, artificial intelligence, etc.

[0081] See also Figure 3 , Figure 3 is a first flow chart of the anomaly detection method provided in the embodiment of the present application, which will be combined with Figure 3 The steps shown are used to illustrate the anomaly detection method provided in the embodiment of the present application. Figure 3 The execution subject is the server.

[0082] In step S101, an image to be detected is acquired, and a first identifier of an object to be detected and a first rotation angle of a detection frame of the object to be detected included in the image to be detected are determined.

[0083] In some embodiments, the image to be detected may be at least one image, that is, the number of the images to be detected may be one or more. The image to be detected may be a 2D image or a 3D image. When the image to be detected is multiple images, the image to be detected may include both a 2D image and a 3D image. Among them, a 2D image does not include depth information of the object to be detected, such as a photo of a vehicle on the road; a 3D image is composed of points in a 3D space, which can reflect the three-dimensional shape and position of the object to be detected. Exemplarily, the 3D image may be a point cloud image generated by a laser radar. Among them, the objects to be detected may include pedestrians, vehicles, roads, traffic signs, buildings, etc.

[0084] In some embodiments, a first rotation angle of a detection frame of an object to be detected in an image to be detected may be determined by a 3D target detection method, and based on this, a first identifier of the object to be detected in the image to be detected may also be determined by a 3D multi-target tracking method.

[0085] In some embodiments, the above-mentioned “3D target detection method determines the first rotation angle of the detection frame in the image to be detected” indicates that the rotation angle of the detection frame, usually the yaw angle (Yaw), can be determined by the 3D target detection algorithm. The first rotation angle is one of the important parameters of the detection frame and describes the direction information of the target. Next, based on the detection result of the 3D target detection, the first identification of the object to be detected is determined by 3D multi-target tracking, that is, the detected object to be detected and its detection frame are further input into the 3D multi-target tracking algorithm. The tracking method assigns a unique identification (Identification, ID) to each object to be detected, which is used to distinguish and continuously track the object to be detected (for example, the same vehicle maintains the same ID in multiple frames of images).

[0086] In some embodiments, the purpose of the 3D target detection method is to detect the object to be detected in a single frame of input data (such as a point cloud image or a 2D image), and generate a 3D detection frame and related information (such as position, size, category, direction, etc.). The 3D target detection method may include: a detection method based on a laser radar point cloud, a detection method based on a camera image, and a multi-sensor fusion method. Among them, the detection method based on the laser radar point cloud can adopt at least one of the following: Voxel-based method, Point-based method Hybrid method, etc.; the detection method based on the camera image can adopt at least one of the following: monocular 3D target detection, binocular 3D target detection, etc.; the multi-sensor fusion method refers to the fusion of the input of multiple sensors such as laser radar, camera, radar, etc., combined with geometric information and semantic features, to improve the detection accuracy and robustness. Exemplarily, the multi-sensor fusion method can be AVOD, PointFusion.

[0087] In some embodiments, the task of 3D multi-target tracking is to determine the unique identification (ID) of each object to be detected and estimate its continuous motion trajectory based on the historical trajectory of the target and the current detection result. The 3D multi-target tracking method may include at least one of the following: target matching method, state estimation method, feature fusion method, deep learning method, etc.

[0088] In step S102, a first dictionary is obtained.

[0089] In the embodiment of the present application, the first dictionary includes M second identifiers and a second rotation angle set corresponding to each second identifier, and the second rotation angle set includes second rotation angles corresponding to different timestamps.

[0090] In some embodiments, the M second identifiers are stored in the first dictionary in the form of keywords, and the second rotation angle set is stored in the first dictionary in the form of values. The M second identifiers are identifiers of the objects to be detected obtained by 3D multi-target tracking, and the second rotation angle is the rotation angle of the detection frame of the objects to be detected obtained by 3D target detection. M is a positive integer representing the number of objects to be detected identified within a preset time threshold (e.g., 2 seconds), and M can be 5, 8, 15, etc., for example.

[0091] In some embodiments, the server itself stores the first dictionary, and therefore, the first dictionary can be obtained from the storage space of the server based on the storage location of the first dictionary, wherein the storage location can be a custom memory space location or a default memory space location.

[0092] In some embodiments, before executing the above step S102, a first dictionary may be obtained first, wherein the first dictionary may be obtained by: obtaining a second dictionary, the second dictionary being a dictionary corresponding to a timestamp before obtaining the image to be detected; storing the first identifier as a keyword in the second dictionary; and storing the first rotation angle as a value in the second dictionary to obtain the first dictionary.

[0093] In some embodiments, the second dictionary refers to the dictionary corresponding to the previous timestamp, and the first identifier and the first rotation angle in step S101 are not stored in the second dictionary. Based on this, after step S101, the first identifier and the first rotation angle are stored in the second dictionary to obtain the first dictionary.

[0094] In some embodiments, the implementation process of "storing the first identifier and the first rotation angle in the second dictionary" may include: storing the first identifier as a keyword in the second dictionary, and storing the first rotation angle as a value in the second dictionary. Next, the implementation process of "storing the first identifier as a keyword in the second dictionary, and storing the first rotation angle as a value in the second dictionary" may include: detecting whether the keyword in the second dictionary includes the first identifier, if the keyword in the second dictionary includes the first identifier, then using the first rotation angle as the value of the keyword of the first identifier, and storing the first rotation angle in the second dictionary to obtain the first dictionary. If the keyword in the second dictionary does not include the first identifier, then creating a new keyword, and determining the first identifier as the newly created keyword; then using the first rotation angle as the value of the keyword of the first identifier, and storing the first rotation angle in the second dictionary to obtain the first dictionary.

[0095] In some embodiments, an empty initial dictionary may be created first, and after each historical image is obtained, the historical identifier and historical rotation angle of the object to be detected in the historical image are determined, and the historical identifier and historical rotation angle are stored in the initial dictionary, thereby obtaining a second dictionary.

[0096] In some embodiments, to ensure the validity of the second identifier and the second rotation angle in the first dictionary, the first dictionary may be updated in the following three ways, which are described in detail below.

[0097] The first updating method is, for each second identifier, when the second number of second rotation angles corresponding to the second identifier is greater than the second number threshold, obtaining the first timestamp corresponding to each second rotation angle; sorting the second rotation angles in ascending order of the first timestamps to obtain the sorted rotation angles; deleting the first L second rotation angles in the sorted rotation angles from the first dictionary to obtain the updated first dictionary, where L is a positive integer.

[0098] In some embodiments, in order to improve the efficiency of determining the reference rotation angle, and also to control memory usage and improve search efficiency, when the second number of second rotation angles corresponding to the second identifier is greater than the second number threshold, the second rotation angles are deleted to obtain an updated first dictionary, so that the second number of second rotation angles corresponding to each second identifier does not exceed the second number threshold. The second number threshold is a value set in advance based on experience, and illustratively, the second number threshold can be 20, 25, 30, etc.

[0099] In some embodiments, the first timestamp corresponding to the second rotation angle refers to the timestamp of the historical image corresponding to the second rotation angle, that is, the first timestamp is the time when the historical image corresponding to the second rotation angle is collected. Based on this, the above "sorting the second rotation angles in the order of the first timestamps from small to large to obtain the sorted rotation angles" may mean that the second rotation angles can be sorted in the order of the first timestamps from early to late, so as to obtain the sorted rotation angles. Then, the first L second rotation angles in the sorted rotation angles are deleted to obtain the updated first dictionary, where L is a positive integer, where L can be the difference between the second number and the second number threshold. For example, assuming that the second number is 25 and the second number threshold is 20, then L is 5, that is, the first 5 second rotation angles in the sorted rotation angles are deleted to obtain the updated first dictionary, and the number of second rotation angles corresponding to the second identifier in the updated first dictionary is 20. In this way, the second rotation angles obtained earlier are deleted, thereby ensuring the timeliness of the updated first dictionary.

[0100] In some embodiments, if the second number is less than or equal to a second number threshold, the current first dictionary remains unchanged.

[0101] The second updating method is that when there is a third timestamp in the first timestamp whose time interval with the current timestamp is greater than the time threshold, the second rotation angle corresponding to the third timestamp is deleted from the first dictionary to obtain an updated first dictionary.

[0102] In some embodiments, the current timestamp can be subtracted from each first timestamp to obtain a time interval; if the time interval is greater than a time threshold, the first timestamp corresponding to the time interval is determined as a third timestamp, and the second rotation angle corresponding to the third timestamp is deleted from the first dictionary. The time threshold is a value set in advance based on experience, and illustratively, the time threshold can be 2 seconds, 2.5 seconds, 3 seconds, etc. Taking the time threshold of 2 seconds as an example, the embodiment of the present application will delete the second rotation angle that is more than 2 seconds away from the current timestamp, thereby ensuring the real-time performance of the first dictionary.

[0103] The third updating method is to obtain, for each second identifier, the second timestamp of each second rotation angle corresponding to the second identifier; determine the maximum timestamp from the second timestamps; when the time interval between the maximum timestamp and the current timestamp is greater than a time threshold, delete the second identifier and the second rotation angle corresponding to the second identifier from the first dictionary to obtain an updated first dictionary.

[0104] In some embodiments, the above-mentioned maximum timestamp refers to the latest or latest second timestamp. Based on this, if the time interval between the maximum timestamp and the current timestamp is greater than the time threshold, it means that the time interval between each second timestamp and the current timestamp is greater than the time threshold. Then, each second rotation angle is considered to be an invalid rotation angle, that is, there is no valid second rotation angle for the second identifier. Then, not only all second rotation angles corresponding to the second identifier are deleted from the first dictionary, but also the second identifier is deleted, thereby ensuring the timeliness of the first dictionary.

[0105] In step S103, a third rotation angle set corresponding to the first identifier is determined from the M second rotation angle sets.

[0106] In some embodiments, M second rotation angle sets correspond to M second identifiers, that is, each second rotation angle set corresponds to a second identifier; and since the first identifier and the first rotation angle have been stored in the first dictionary, the M second identifiers include the first identifier. Based on this, the first identifier is first determined from the second identifiers based on the first identifier, and then the second rotation angle set corresponding to the first identifier is determined as the third rotation angle set. The third rotation angle set includes at least one third rotation angle.

[0107] In step S104, when the number of elements in the third rotation angle set is greater than a first number threshold, a reference rotation angle corresponding to the first identifier is determined from the third rotation angle set.

[0108] In some embodiments, the number of elements in the third rotation angle set is the number of third rotation angles in the third rotation angle set. When the number of elements is greater than the first number threshold, it indicates that the number of third rotation angles in the third rotation angle set is sufficient and diverse, and the reference rotation angle corresponding to the first identifier is determined based on the third rotation angle set; and when the number of elements is less than or equal to the first number threshold, it indicates that the number of third rotation angles in the third rotation angle set is scarce and single, and the process is terminated at this time. The first number threshold is a value set in advance based on experience, and the first number threshold is less than the above-mentioned second number threshold. Exemplarily, the first number threshold can be 9, 10, 11, etc.

[0109] In some embodiments, see Figure 4 The "determining the reference rotation angle corresponding to the first identifier from the third rotation angle set" in the above step S104 can be implemented by the following steps S1041 to S1043, which are described in detail below.

[0110] In step S1041 , for each third rotation angle in the third rotation angle set, a first angle difference between the third rotation angle and the remaining third rotation angles in the third rotation angle set is determined.

[0111] Continuing with the above example, assuming that the first quantity threshold is 9 and the number of elements is 10, the third rotation angle set includes 10 third rotation angles, based on which, for each third rotation angle, the first angle difference between the third rotation angle and the remaining third rotation angles in the third rotation angle set is determined. The remaining third rotation angles in the third rotation angle set include 9 remaining third rotation angles, so the above “determine the first angle difference between the third rotation angle and the remaining third rotation angles in the third rotation angle set” means that, for each remaining third rotation angle, the first angle difference between the third rotation angle and the remaining third rotation angle is determined, so that 9 first angle differences are determined.

[0112] In some embodiments, taking another third rotation angle as an example, see Figure 5 The "determining the first angle difference between the third rotation angle and the remaining third rotation angles in the third rotation angle set" in the above step S1041 can be achieved through the following steps S0411 to 04113, which are described in detail below.

[0113] In step S0411, it is determined whether the third rotation angle and the remaining third rotation angles are all non-negative numbers.

[0114] In some embodiments, the third rotation angle and the remaining third rotation angles all refer to angle values, that is, the third rotation angle and the remaining third rotation angles are all numerical values. Taking the third rotation angle as an example, the relationship between the third rotation angle and 0 can be determined. If the third rotation angle is greater than or equal to 0, it indicates that the third rotation angle is a non-negative number; and if the third rotation angle is less than 0, it is determined that the third rotation angle is a negative number.

[0115] In some embodiments, when the third rotation angle and the remaining third rotation angles are all non-negative numbers, the process proceeds to step S0412; when the third rotation angle and the remaining third rotation angles are not all non-negative numbers, the process proceeds to step S0415.

[0116] In step S0412, a first difference between the third rotation angle and the remaining third rotation angles is determined, and a first absolute value of the first difference is determined.

[0117] In some embodiments, if the first difference is a negative number, the opposite of the first difference is determined as the first absolute value. For example, assuming that the third rotation angle is 2.45 and the remaining third rotation angles are 2.57, the first difference between the third rotation angle and the remaining third rotation angles is -0.12, then 0.12 is determined as the first absolute value; and if the first difference is non-negative, the first difference is determined as the first absolute value.

[0118] In step S0413, a second difference between the preset angle and the first absolute value is determined.

[0119] In some embodiments, the preset angle is a value set in advance. In the case where the angle direction is not considered, the preset angle can be set to 3.14, and in the case where the angle direction is considered, the preset angle can be set to 6.28. In the embodiment of the present application, the preset angle is set to 3.14.

[0120] Continuing with the above example, assuming that the first absolute value is 0.12 and the preset angle is 3.14, 3.02 is determined as the second difference value.

[0121] In step S0414, the smaller value between the first absolute value and the second difference is determined as the first angle difference, and the process ends.

[0122] Continuing with the above example, assuming that the first absolute value is 0.12 and the second difference value is 3.02, 0.12 is determined as the first angle difference value.

[0123] The above steps S0412 to S0414 can be implemented by the following formula (1):

[0124] The first angle difference = min(abs(ab),3.14-abs(ab)) Formula (1);

[0125] In the above formula (1), a represents the third rotation angle, b represents the remaining third rotation angles, abs(.) represents taking the absolute value, and min(.) represents taking the smaller value.

[0126] In step S0415, it is determined whether the third rotation angle and the remaining third rotation angles are all negative numbers.

[0127] In some embodiments, when the third rotation angle and the remaining third rotation angles are all non-negative numbers, step S0416 is entered; when the third rotation angle and the remaining third rotation angles are not all negative numbers, indicating that one of the third rotation angle and the remaining third rotation angles is a negative number and the other is a non-negative number, step S04110 is entered.

[0128] In step S0416, a first sum of the third rotation angle and the preset angle, and a second sum of the remaining third rotation angles and the preset angle are determined.

[0129] Continuing with the above example, the sum of the third rotation angle and 3.14 is determined as the first sum value, and the sum of the remaining third rotation angles and 3.14 is determined as the second sum value.

[0130] In step S0417, a third difference between the first sum and the second sum is determined, and a second absolute value of the third difference is determined.

[0131] In some embodiments, the implementation process of step S0417 is similar to the implementation process of the above-mentioned step S0412. Therefore, the implementation process of step S0417 can refer to the implementation process of the above-mentioned step S0412.

[0132] In step S0418, a fourth difference between the preset angle and the second absolute value is determined.

[0133] In some embodiments, the implementation process of step S0418 is similar to the implementation process of the above-mentioned step S0413. Therefore, the implementation process of step S0418 can refer to the implementation process of the above-mentioned step S0413.

[0134] In step S0419, the smaller value between the second absolute value and the fourth difference is determined as the first angle difference, and the process ends.

[0135] In some embodiments, the implementation process of step S0419 is similar to the implementation process of the above-mentioned step S0414. Therefore, the implementation process of step S0419 can refer to the implementation process of the above-mentioned step S0414.

[0136] The above steps S0416 to S0419 can be implemented by the following formula (2):

[0137] First angle difference=min(abs((3.14+a)-(3.14+b)),3.14-abs((3.14+a)-(3.14+b))) formula (2);

[0138] In the above formula (2), a represents the third rotation angle, b represents the remaining third rotation angles, abs(.) represents taking the absolute value, and min(.) represents taking the smaller value.

[0139] In step S04110, a third sum of the negative rotation angle and the preset angle is determined.

[0140] Here, it means that one of the third rotation angle and the remaining third rotation angle is a negative number and the other is a non-negative number. Continuing with the above example, the sum of the negative rotation angle and 3.14 is determined as the third sum value.

[0141] In step S04111, a fifth difference between the third sum and the non-negative rotation angle is determined, and a third absolute value of the fifth difference is determined.

[0142] In some embodiments, the implementation process of step S04111 is similar to the implementation process of the above-mentioned step S0412. Therefore, the implementation process of step S04111 may refer to the implementation process of the above-mentioned step S0412.

[0143] In step S04112, a sixth difference between the preset angle and the third absolute value is determined.

[0144] In some embodiments, the implementation process of step S04112 is similar to the implementation process of the above-mentioned step S0413. Therefore, the implementation process of step S04112 can refer to the implementation process of the above-mentioned step S0413.

[0145] In step S04113, the smaller value between the third absolute value and the sixth difference value is determined as the first angle difference.

[0146] In some embodiments, the implementation process of step S04113 is similar to the implementation process of the above-mentioned step S0414. Therefore, the implementation process of step S04113 can refer to the implementation process of the above-mentioned step S0414.

[0147] Taking the third rotation angle as a negative number and the other third rotation angles as non-negative numbers as an example, the above steps S04110 to S04113 can be implemented by the following formula (3):

[0148] First angle difference = min(abs((3.14+a)-b), 3.14-abs((3.14+a)-b)) formula (3);

[0149] In the above formula (3), a represents the third rotation angle, b represents the remaining third rotation angles, abs(.) represents taking the absolute value, and min(.) represents taking the smaller value.

[0150] Through the above steps S0411 to S04113, the third rotation angle is usually calculated in a circular space, and its range is periodic (for example, [0, 2π) or [-π, π)). Directly comparing the third rotation angle may lead to errors or inconsistencies. The embodiment of the present application can ensure the consistency of the first angle difference in the periodic space; by using the absolute value and the preset angle (3.14 corresponds to 180°), the first angle difference is normalized to the minimum value; regardless of the sign or size of the third rotation angle, the correct first angle difference can be determined. The third rotation angle may be positive or negative, and directly determining the first angle difference may ignore the meaning of the sign, resulting in erroneous results; the embodiment of the present application processes the sign of the third rotation angle in different cases, and through the clever conversion of adding and subtracting the preset angle, it is ensured that the sign difference will not affect the final result. The first angle difference is determined by using the preset angle and the absolute value, and the smaller result is selected from the two possible values ​​to ensure that the final angle difference is the shortest path. It also avoids errors or conflicts caused by extreme values ​​or boundary values, thereby improving the stability and reliability of the calculation process.

[0151] Continue to see Figure 4 , continue with step S1041 above to explain

[0152] In step S1042, a first number of first angle differences that are smaller than a first angle threshold is determined, and the first number is determined as a valid value of the third rotation angle.

[0153] In some embodiments, the first angle threshold is a value set in advance based on experience. For example, the first angle threshold can be set to 0.15, 0.13, 0.1, etc. When the first angle difference is less than the first angle threshold, the two third rotation angles are considered to be the same or approximately the same. Continuing with the above example, assuming that the first angle differences between the third rotation angle Y1 and the remaining third rotation angles are: 0.16, 0.13, 0.12, 0.3, 0.02, 0.05, 0.11, 0.22, 0.06, respectively, and the first angle threshold is 0.15, then 6 is determined as the first number, and 6 is also determined as the valid value of the third rotation angle.

[0154] In step S1043, the third rotation angle corresponding to the maximum effective value in the third rotation angle set is determined as the reference rotation angle corresponding to the first identifier.

[0155] In some embodiments, following the above example, assuming that the third rotation angle set includes third rotation angles Y1 to Y10, and the valid values ​​of the third rotation angles Y1 to Y10 are 6, 4, 5, 8, 7, 3, 2, 4, 6, and 5, respectively, the third rotation angle Y4 is determined as the reference rotation angle corresponding to the first identifier.

[0156] Through the above steps S1041 to S1043, the angles in the third rotation angle concentration may deviate due to noise or multi-target influence. Selecting the most representative third rotation angle as the reference rotation angle can reduce the error. By determining the first angle difference between each third rotation angle and the remaining third angles, the third rotation angle with the largest effective value is screened out to ensure that the selected reference rotation angle has global representativeness. Through the screening of the "first angle threshold", the "effective value" of each third rotation angle is determined. The noise point is naturally excluded because the deviation is too large and cannot meet the threshold condition. In the case of abnormal data or uneven distribution of the third rotation angle, simply selecting the mean or median may lose representativeness; by selecting the third rotation angle with the largest effective value, it can adapt to different data distributions and avoid interference from a few abnormal data. The third rotation angle corresponding to the maximum effective value is often the most densely distributed part, so it can automatically adapt to different targets or distribution patterns, enhancing the flexibility of the algorithm. The first angle threshold can be adjusted according to specific needs, thereby controlling the screening range of the effective value and adapting to different application scenarios. Through the logic of the "maximum effective value", the selection basis of the reference angle is clarified, making the results easier to understand and accept. The method for determining the effective value of each third rotation angle is simple and can be completed with only one traversal, with low computational overhead, and is suitable for scenarios with high real-time requirements.

[0157] Continue to see Figure 3 , and the description continues with step S104 above.

[0158] In step S105, an abnormality detection is performed on the first rotation angle based on the reference rotation angle to obtain a detection result of the first rotation angle.

[0159] In some embodiments, the implementation process of the above step S105 may include: determining a second angle difference between the first rotation angle and the reference rotation angle; when the second angle difference is less than a second angle threshold, determining that the detection result of the first rotation angle is normal; when the second angle difference is greater than or equal to the second angle threshold, determining that the detection result is abnormal.

[0160] In some embodiments, the seventh difference between the first rotation angle and the reference rotation angle may be determined first. If the seventh difference is a non-negative number, the seventh difference is determined as the second angle difference. If the seventh difference is a negative number, the opposite of the seventh difference is determined as the second angle difference.

[0161] In some embodiments, the second angle threshold is a value set in advance based on experience, and illustratively, the second angle threshold may be 0.11, 0.12, 0.13, etc. If the second angle difference is less than the second angle threshold, it indicates that the first rotation angle is the same or approximately the same as the reference rotation angle, and at this time, the detection result of the first rotation angle is determined to be normal; and if the second angle difference is greater than or equal to the second angle threshold, it indicates that the first rotation angle is different from the reference rotation angle, and at this time, the detection result of the first rotation angle is determined to be abnormal.

[0162] Through the above steps S101 to S105, for the first identifier of the object to be detected in the image to be detected, the third rotation angle set corresponding to the first identifier is first determined from the M second rotation angle sets of the first dictionary, and when the number of elements in the third rotation angle set is greater than the first number threshold, the product determines the reference rotation angle corresponding to the first identifier in each third rotation angle set. Since the third rotation angle set includes the third rotation angle, that is, when the number of the third rotation angles is greater than the first number threshold, the reference rotation angle corresponding to the first identifier is determined from multiple third rotation angles, thereby improving the accuracy of the reference rotation angle; based on this, the first rotation angle is used to perform abnormality detection on the first rotation angle, wherein the first rotation angle is the rotation angle of the detection frame of the object to be detected in the image to be detected. Since the reference rotation angle has the characteristic of high accuracy, efficient and accurate abnormality detection can be achieved based on the reference rotation angle. Then, the normality of the first rotation angle is identified through abnormality detection, and accurate data support is provided for subsequent applications such as autonomous driving, navigation or augmented reality.

[0163] In some embodiments, after the above step S105, see Figure 6 The anomaly detection method can also perform the following steps S106 to S112, which are described in detail below.

[0164] In step S106, it is determined whether the detection result is normal.

[0165] In some embodiments, when the detection result is normal, it indicates that the first rotation angle is correct and no correction is required, and the process proceeds to step S107; when the detection result is abnormal, it indicates that the detection result is abnormal, that is, the first rotation angle is incorrect and correction is required, and the process proceeds to step S108.

[0166] In step S107, the first rotation angle is determined as the updated first rotation angle, and the process proceeds to step S109.

[0167] Here, it indicates that the first rotation angle is correct, that is, the first rotation angle does not need to be corrected, so the first rotation angle is kept unchanged, that is, the first rotation angle is determined as the updated first rotation angle.

[0168] In step S108 , the reference rotation angle is determined as the updated first rotation angle.

[0169] Here, it indicates that the first rotation angle is incorrect, that is, the first rotation angle needs to be corrected, and the reference rotation angle is determined as the updated first rotation angle.

[0170] In step S109, the position information, size information and category information of the object to be detected, as well as the preset position and the current position of the electronic device are obtained.

[0171] In some embodiments, the position information, size information and category information of the object to be detected can be obtained through 3D target detection, wherein the position information can be the three-dimensional coordinates of the object to be detected in the three-dimensional space; the size information can refer to the shape of the object to be detected, and exemplarily, the size information can be represented by length, width and height; the category information can refer to the type of the object to be detected, and exemplarily, the category information can be a pedestrian.

[0172] In some embodiments, the preset position is a position set in advance, which can be a three-dimensional coordinate, and the preset position refers to the target position of the electronic device. For example, the preset position can be the coordinates of the destination. The current position of the electronic device refers to the coordinates of the current position of the electronic device.

[0173] In step S110, the updated first rotation angle, position information, size information and category information are determined as the recognition result of the object to be detected.

[0174] In some embodiments, the updated first rotation angle is used to replace the first rotation angle in the 3D object detection result, where the 3D object detection result includes position information, size information, and category information, thereby obtaining a recognition result of the object to be detected.

[0175] In step S111, path planning is performed based on the recognition result, the preset position and the current position to obtain the moving path of the electronic device.

[0176] In some embodiments, a map (static or dynamic) can be constructed based on the recognition results, preset locations and current locations, marking the passable areas and obstacle locations; then, the optimal path from the current location to the target point is determined, thereby obtaining the moving path of the electronic device.

[0177] In step S112, the electronic device is controlled to move based on the moving path until it reaches a preset position.

[0178] In some embodiments, a control algorithm is used to track the movement path, which control algorithm may be a proportional-integral-derivative controller (PID) or a model predictive control (MPC), and the speed and direction are adjusted until the electronic device reaches a preset position.

[0179] Through the above steps S106 to S112, when the detection result is abnormal, the reference rotation angle is used as the updated first rotation angle, which can quickly adjust the detection state of the electronic device, reduce the execution deviation caused by wrong judgment, and comprehensively consider the position information, size information and category information of the object to be detected, which is helpful to improve the recognition accuracy of the object to be detected and ensure that the basic data based on the path planning is correct. Using the updated first rotation angle and the object information of the object to be detected that are updated in real time, the moving path of the electronic device can be better planned, unnecessary path detours can be reduced, and the efficiency of reaching the preset position can be improved. Combining the real-time recognition results with path planning, the electronic device is supported to achieve efficient navigation in a complex or changing environment. When detecting an abnormality, the electronic device can automatically adjust the first rotation angle and path planning to avoid system interruption due to single point failure. With the help of size information and category information, the electronic device can adapt to the processing of objects of different sizes and categories to be detected, and has a wider applicability. Based on the updated first rotation angle and accurate recognition results, the moving path of the electronic device is more in line with actual needs, reducing the target deviation caused by path errors. In this way, the control device moves based on the optimized path, ensuring that the preset position is finally accurately reached to avoid repeated operations.

[0180] The following is an explanation of an exemplary application of an embodiment of the present application in a practical application scenario.

[0181] As an important research direction in the field of computer vision, 3D object detection has received widespread attention and application in recent years. 3D object detection refers to the technology of detecting and locating objects in three-dimensional space. 3D object detection obtains three-dimensional point cloud data or image information through different sensors (such as lidar, camera, etc.), and then identifies and locates the target objects in the environment. This technology is widely used in fields such as autonomous driving, robot navigation, augmented reality, etc., providing these fields with more accurate and comprehensive environmental perception capabilities.

[0182] With the rapid development of autonomous driving and robotics, the requirements for accuracy and real-time performance of environmental perception are becoming increasingly higher. Although traditional 2D object detection can identify objects in images and provide their location information, in the real three-dimensional world, objects have three-dimensional shapes and postures, so 2D detection cannot meet the accuracy and comprehensiveness requirements of these applications. 3D object detection can provide more accurate and comprehensive object location and shape information, thus becoming an important technical support in these fields.

[0183] In an embodiment of the present application, for a target with the same tracking ID, when the rotation angle is correct most of the time and a small number of angles change suddenly, an anomaly detection method is proposed. The anomaly detection method can correct the wrong rotation angle scheme, thereby solving the problem of inaccurate angle of the detection frame output by 3D target detection.

[0184] In some embodiments, anomaly detection is performed on the output content or output result of 3D target detection. Based on this, 3D target detection and 3D multi-target tracking may also be performed before anomaly detection is performed.

[0185] For 3D object detection, taking the Bird Eye View Fusion (BEVFusion) algorithm as an example, the input of the BEVFusion algorithm mainly includes raw data from different sensors, which may include cameras and LiDAR (Light Detection and Ranging). Among them, the input data may include camera images and LiDAR point clouds. Camera images refer to red, green, and blue (RGB) images from multiple perspectives (such as front, back, left, and right). Camera images provide rich semantic information. LiDAR point clouds refer to point cloud data in 3D space, which contain the geometric shape and position information of objects.

[0186] In some embodiments, the core of the BEVFusion algorithm is to fuse data from different sensors into a unified representation space, which can be a bird's eye view (BEV); then perform 3D target detection, where 3D target detection includes data preprocessing, feature extraction, data fusion and BEV feature encoding.

[0187] In some embodiments, data preprocessing includes: first, preprocessing the camera image and the lidar point cloud, including coordinate transformation, normalization, etc., to ensure that the data adapts to the representation space of the BEV; second, performing operations such as distortion correction on the camera image; finally, filtering, downsampling, etc. on the lidar point cloud.

[0188] In some embodiments, feature extraction may refer to extracting features from preprocessed data using deep learning models such as convolutional neural networks (CNN) or transformers. Feature extraction includes: first, extracting semantic feature maps from camera images through CNN; then, extracting geometric features from lidar point clouds through point cloud processing networks (such as PointNet++).

[0189] In some embodiments, data fusion is to project features from different sensors into the BEV space. Data fusion includes: first, the camera feature is transformed from the camera to the BEV, each camera feature pixel is projected back to a ray in the 3D space, and scattered along the ray to multiple discrete points to form a camera feature point cloud; then, the lidar feature is directly projected from the LiDAR to the BEV, and the sparse point cloud is flattened along the height dimension; finally, the feature point clouds of the camera and lidar are aggregated into a unified BEV grid using the BEV pooling operation.

[0190] In some embodiments, the unified BEV features are further processed using a convolution-based BEV encoder to mitigate local misalignment between different features.

[0191] Based on this, a task-specific head (such as a detection head) is applied to the fused BEV feature map to perform 3D object detection, thereby outputting information such as the position, size, and category of the detected 3D object.

[0192] In some embodiments, the model outputs 3D detection boxes of all detected objects, and the visualization of the detection boxes on the lidar point cloud and camera image is as follows: Fig. 7A and Figure 7B As shown, Fig. 7A is a schematic diagram showing the display of a detection frame in a laser radar point cloud provided in an embodiment of the present application, Figure 7BIt is a schematic diagram of displaying a detection frame in a camera image provided by an embodiment of the present application.

[0193] In some other embodiments, each 3D object detection box may be represented by the following values:

[0194] First, the center point of the detection box can be represented by 3D coordinates, such as (x, y, z);

[0195] Second, the size of the detection box can be expressed by length, width and height, for example (l, w, h);

[0196] Third, the detection frame orientation angle, that is, the horizontal rotation angle of the detection frame, can also be called the rotation angle of the detection frame, denoted as yaw;

[0197] Fourth, categories, such as people, cars, trucks, etc.;

[0198] Fifth, confidence.

[0199] For 3D multi-target tracking, taking the Kalman filter method as an example, 3D multi-target tracking based on Kalman filtering is a method for continuously tracking multiple three-dimensional targets in a complex environment.

[0200] In some embodiments, when performing 3D multi-target tracking, the input includes the output results and initial state information of 3D target detection. Among them, the output results of 3D target detection include the three-dimensional target detection frame information of each frame, that is, the output results of the detection model for 3D target detection, including the center point coordinates, size, orientation angle (rotation angle), category and confidence of the target frame, and also includes the timestamp of the current moment, and the timestamp is at least accurate to milliseconds (ms). For each newly detected target, its state information needs to be initialized. The initial state information may include position, speed, acceleration, etc. The position in the initial state information can be directly set according to the detection data, and the speed and acceleration in the initial state information default to 0.

[0201] In some embodiments, the processing steps of 3D multi-target tracking include trajectory initialization, Kalman filter prediction, data association and Kalman filter update. Among them, for trajectory initialization, it means to initialize the trajectory of each newly detected target, including setting Kalman filter parameters such as initial state estimate, transfer matrix, observation matrix, process noise covariance matrix and observation noise covariance matrix. For Kalman filter prediction, a constant rate Kalman filter algorithm (or other appropriate Kalman filter variants) can be used to predict the target state (such as position, speed) at the current moment according to the target's motion model and the state estimate at the previous moment; and the prediction process takes into account the dynamic information and process noise of the system to cope with the uncertainty in the target motion. For data association, the Hungarian algorithm can be used to associate the predicted trajectory with the three-dimensional target detection data of the current frame. In some embodiments, other data association algorithms, such as Intersection over Union (IOU) matching, can also be used. Data association is to solve the problem of identity recognition of the same target between different frames; by comparing the similarity between the predicted trajectory and the observed data (such as position, size, shape, etc.), determine which detection data belongs to which tracked target. For Kalman filter update, according to the result of data association, the Kalman gain is used to perform weighted averaging on the predicted state and observed data to obtain the optimal state estimate at the current moment, and the update process combines the predicted information and the observed information to minimize the estimation error.

[0202] In some embodiments, for all input detection frames, the tracking ID of each detection frame and the speed in the x-axis direction and the speed in the y-axis direction are output through 3D multi-target tracking, wherein the tracking ID corresponds to the first identifier or the second identifier in other embodiments.

[0203] In some embodiments, Fig. 8A This is a schematic diagram of the detection frame with the correct rotation angle, see Fig. 8A , 801 is the target, the category of the target is object, Fig. 8A Visualization result of a detection box with a top-down angle that identifies the target as an object category on the radar point cloud. The rotation angle of the target 801 is -1.583453. Fig. 8A It can be seen that if the detection result is consistent with the point cloud contour, it can be considered as the correct detection frame.

[0204] In other embodiments, Figure 8B This is a schematic diagram of the display of the detection frame with the wrong rotation angle, see Figure 8B , 801 is a target, the category of the target 801 is object, and the rotation angle of the target 801 is -0.434756. Fig. 8A and Figure 8BThe detection boxes in are the detection boxes of the same target at different times. Figure 8B It can be seen that if the angle of the detection frame is significantly different from the actual point cloud, it can be considered as an erroneous detection frame. The target corresponds to the object to be detected in other embodiments.

[0205] In the embodiment of the present application, for a target with the same tracking ID, when the rotation angle is correct most of the time and a small number of angles change suddenly, the wrong rotation angle is identified and corrected through the following steps 1 to 8, which are described in detail below.

[0206] Step 1: Create a new dictionary 1. Dictionary 1 is initially empty. The function of dictionary 1 is to store all the tracking IDs and the corresponding detection frames at different times. The keyword of dictionary 1 is the tracking ID, and the value of the dictionary is the detection frame at different times corresponding to the tracking ID. Dictionary 1 corresponds to the first dictionary in other embodiments, and the detection frame corresponds to the second rotation angle set in other embodiments.

[0207] Step 2, traverse all detection frames of the current frame and determine the number of times the tracking ID of the detection frame appears. For example, if the tracking ID of a target frame is 0, first search in dictionary 1 whether the tracking ID 0 already exists; if the tracking ID 0 already exists, then merge the current detection frame into the value corresponding to the tracking ID 0, and obtain the number of detection frames at different times corresponding to the ID, where the C++ language support can be used to directly obtain; if the tracking ID 0 does not exist, create a new key-value pair, the keyword is 0, and the value is the corresponding detection frame. The current detection frame corresponds to the first rotation angle of the detection frame of the object to be detected in other embodiments.

[0208] Step 3: For step 2, if the number of detection boxes stored in dictionary 1 for the current tracking ID is less than 10, no processing is performed, and the process ends; if the number of detection boxes of the stored tracking ID is between 10 and 15, step 4 is executed.

[0209] Step 4. Here, we take tracking ID 0 as an example. Assuming that tracking ID 0 in dictionary 1 has stored more than 10 historical detection frames at different times, the distribution of rotation angles in these historical detection frames is counted, including: traversing all historical detection frames of tracking ID 0, starting from the 0th detection frame, determining the angle between the 0th detection frame and the other nine detection frames, and the angle distribution value of each detection frame is as follows: Fig. 9 As shown, it can be between 0 and 3.14 or -3.14 and 0. Based on this, assuming that the rotation angle of the 0th frame is 1.57 and the rotation angle of the 1st detection frame is 1.6, the angle between the two is 0.03. The angle corresponds to the first angle difference in other embodiments.

[0210] In some embodiments, the angle between any detection frame and other detection frames can be determined using the following formula (4).

[0211]

[0212] In formula (4), a represents the angle of the detection frame at the first timestamp, b represents the angle of the detection frame at the second timestamp, abs(.) represents the absolute value, min(.) represents the smaller value, and the angle represents the angle difference between the two detection frames at different timestamps.

[0213] In the embodiment of the present application, the direction of the angle is not considered, only the angle between the straight lines is considered. For example, when the angles between two detection frames are 1.57 and -1.57, the angle is considered to be 0.

[0214] Step 5, following the above example, since the angles between all detection boxes of ID 0 and other detection boxes have been determined in step 4, the number of angles between each detection box and other detection boxes within the first angle threshold (e.g. 0.15) is counted, and the detection box with the largest number of angles that meet the conditions is considered the best detection box for the tracking ID, and the best detection box is stored in a new dictionary 2. Among them, dictionary 2 is used to save the best detection box for each tracking ID. In the embodiment of the present application, there is only one best detection box for one tracking ID. The best detection box corresponds to the reference rotation angle in other embodiments.

[0215] Step 6: Determine the angle between the detection frame angle of the current timestamp and the angle of the best detection frame. If the angle is less than the second angle threshold (such as 0.12), no processing is performed; if the angle is greater than the threshold, the angle of the current detection frame is updated to the angle of the best detection frame. The angle between the detection frame angle of the current timestamp and the angle of the best detection frame corresponds to the second angle difference in other embodiments.

[0216] Step seven, if the number of detection frames of the tracking ID stored in dictionary 1 is greater than 15, it is necessary to further determine whether the number of detection frames is greater than 20. If the number of detection frames is greater than 20, delete the detection frame with the earliest timestamp of the tracking ID so that the maximum number of detection frames does not exceed 20, and then continue to execute steps four to six; if the number of detection frames is less than or equal to 20, it is considered that the number of detection frames is sufficient at this time. At this time, the first angle threshold can be adjusted to 0.1, and the above steps four to six are continued.

[0217] Step 8: After all detection frames of the current timestamp have been traversed, the timestamp of each tracking ID in dictionary 1 needs to be checked. If the timestamp differs from the current timestamp by more than a time threshold (such as 2 seconds), the tracking ID and all its detection frames are deleted.

[0218] Through the above steps 1 to 8, the optimization of the target angle mutation problem can be achieved.

[0219] It can be understood that in the embodiments of the present application, the collection, use and processing of relevant data such as the image to be detected, the first dictionary, the position information of the object to be detected, the size information of the object to be detected, the category information of the object to be detected, the preset position, the current position of the electronic device, the second dictionary, the first timestamp, the second timestamp, etc. need to comply with relevant laws, regulations and standards.

[0220] The following is a description of an exemplary structure of the abnormality detection device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the abnormality detection device 455 of the memory 450 may include:

[0221] A first acquisition module 4551 is used to acquire an image to be detected, and determine a first identifier of an object to be detected and a first rotation angle of a detection frame of the object to be detected included in the image to be detected; a second acquisition module 4552 is used to acquire a first dictionary, wherein the first dictionary includes M second identifiers and a second rotation angle set corresponding to each second identifier, and the second rotation angle set includes second rotation angles corresponding to different timestamps; a first determination module 4553 is used to determine a third rotation angle set corresponding to the first identifier from the M second rotation angle sets; a second determination module 4554 is used to determine a reference rotation angle corresponding to the first identifier from the third rotation angle set when the number of elements in the third rotation angle set is greater than a first number threshold; a detection module 4555 is used to perform anomaly detection on the first rotation angle based on the reference rotation angle to obtain a detection result of the first rotation angle.

[0222] In some embodiments, the second determining module 4554 is further configured to:

[0223] For each third rotation angle in the third rotation angle set, determine a first angle difference between the third rotation angle and the remaining third rotation angles in the third rotation angle set; determine a first number of first angle differences less than a first angle threshold, and determine the first number as a valid value of the third rotation angle; determine the third rotation angle corresponding to the maximum valid value in the third rotation angle set as a reference rotation angle corresponding to the first identifier.

[0224] In some embodiments, the second determining module 4554 is further configured to:

[0225] When the third rotation angle and the remaining third rotation angles are all non-negative numbers, determine a first difference between the third rotation angle and the remaining third rotation angles, and determine a first absolute value of the first difference; determine a second difference between a preset angle and the first absolute value; and determine the smaller value between the first absolute value and the second difference as the first angle difference.

[0226] In some embodiments, the second determining module 4554 is further configured to:

[0227] When the third rotation angle and the remaining third rotation angles are both negative numbers, determine a first sum of the third rotation angle and the preset angle, and a second sum of the remaining third rotation angles and the preset angle; determine a third difference between the first sum and the second sum, and determine a second absolute value of the third difference; determine a fourth difference between the preset angle and the second absolute value; and determine the smaller value of the second absolute value and the fourth difference as the first angle difference.

[0228] In some embodiments, the second determining module 4554 is further configured to:

[0229] When one of the third rotation angle and the remaining third rotation angles is a negative number and the other is a non-negative number, determine a third sum of the negative rotation angle and the preset angle; determine a fifth difference between the third sum and the non-negative rotation angle, and determine a third absolute value of the fifth difference; determine a sixth difference between the preset angle and the third absolute value; and determine the smaller value between the third absolute value and the sixth difference as the first angle difference.

[0230] In some embodiments, the detection module 4555 is further configured to:

[0231] Determine a second angle difference between the first rotation angle and the reference rotation angle; when the second angle difference is less than a second angle threshold, determine that the detection result of the first rotation angle is normal; when the second angle difference is greater than or equal to the second angle threshold, determine that the detection result is abnormal.

[0232] In some embodiments, the software modules stored in the anomaly detection device 455 of the memory 450 further include:

[0233] The third determination module is used to determine the first rotation angle as the updated first rotation angle when the detection result is normal; the fourth determination module is used to determine the reference rotation angle as the updated first rotation angle when the detection result is abnormal.

[0234] In some embodiments, the software modules stored in the anomaly detection device 455 of the memory 450 further include:

[0235] A third acquisition module is used to obtain the position information, size information and category information of the object to be detected, as well as the preset position and the current position of the electronic device; a fifth determination module is used to determine the updated first rotation angle, the position information, the size information and the category information as the recognition result of the object to be detected; a path planning module is used to perform path planning based on the recognition result, the preset position and the current position to obtain the moving path of the electronic device; a control module is used to control the electronic device to move based on the moving path until it reaches the preset position.

[0236] In some embodiments, the software modules stored in the anomaly detection device 455 of the memory 450 further include:

[0237] The fourth acquisition module is used to obtain a second dictionary, where the second dictionary is a dictionary corresponding to the timestamp before the image to be detected is obtained; the first storage module is used to store the first identifier as a keyword in the second dictionary; the second storage module is used to store the first rotation angle as a value in the second dictionary to obtain the first dictionary.

[0238] In some embodiments, the software modules stored in the anomaly detection device 455 of the memory 450 further include:

[0239] A fifth acquisition module is used to obtain, for each second identification, a first timestamp corresponding to each second rotation angle when the second number of second rotation angles corresponding to the second identification is greater than a second number threshold; a sorting module is used to sort the second rotation angles in ascending order of the first timestamps to obtain the sorted rotation angles; a first deletion module is used to delete the first L second rotation angles in the sorted rotation angles from the first dictionary to obtain an updated first dictionary, where L is a positive integer.

[0240] In some embodiments, the software modules stored in the anomaly detection device 455 of the memory 450 further include:

[0241] The sixth acquisition module is used to obtain, for each second identifier, the second timestamp of each second rotation angle corresponding to the second identifier; the sixth determination module is used to determine the maximum timestamp from the second timestamps; the second deletion module is used to delete the second identifier and the second rotation angle corresponding to the second identifier from the first dictionary when the time interval between the maximum timestamp and the current timestamp is greater than a time threshold, so as to obtain an updated first dictionary.

[0242] The embodiment of the present application provides a computer program product or a computer program, which includes computer executable instructions, and the computer executable instructions are stored in a computer readable storage medium. The processor of the computer device reads the computer executable instructions from the computer readable storage medium, and the processor executes the computer executable instructions, so that the computer device executes the above-mentioned abnormality detection method of the embodiment of the present application.

[0243] The embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will be caused to execute the anomaly detection method provided by the embodiment of the present application, for example, Figure 3 , 6 Anomaly detection method is shown.

[0244] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0245] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0246] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0247] By way of example, computer executable instructions may be deployed to be executed on one computing device or on multiple computing devices located at one site or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0248] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. An anomaly detection method, characterized in that: The method comprises: Acquire an image to be detected, and determine a first identifier of an object to be detected included in the image to be detected and a first rotation angle of a detection frame of the object to be detected; Obtain a first dictionary, wherein the first dictionary includes M second identifiers and a second rotation angle set corresponding to each second identifier, wherein the second rotation angle set includes second rotation angles corresponding to different timestamps; Determine a third rotation angle set corresponding to the first identifier from the M second rotation angle sets; When the number of elements in the third rotation angle set is greater than a first number threshold, determining a reference rotation angle corresponding to the first identifier from the third rotation angle set; An abnormality detection is performed on the first rotation angle based on the reference rotation angle to obtain a detection result of the first rotation angle.

2. The method according to claim 1, characterized in that: The determining a reference rotation angle corresponding to the first identifier from the third rotation angle set includes: For each third rotation angle in the third rotation angle set, determining a first angle difference between the third rotation angle and the remaining third rotation angles in the third rotation angle set; determining a first number of first angle differences less than a first angle threshold, and determining the first number as a valid value of the third rotation angle; The third rotation angle corresponding to the maximum effective value in the third rotation angle set is determined as the reference rotation angle corresponding to the first identifier.

3. The method according to claim 2, characterized in that The determining a first angle difference between the third rotation angle and the remaining third rotation angles in the third rotation angle set comprises: When the third rotation angle and the remaining third rotation angles are both non-negative numbers, determining a first difference between the third rotation angle and the remaining third rotation angles, and determining a first absolute value of the first difference; Determine a second difference between a preset angle and the first absolute value; The smaller value between the first absolute value and the second difference is determined as the first angle difference.

4. The method according to claim 3, characterized in that: The method further comprises: When the third rotation angle and the remaining third rotation angles are both negative numbers, determining a first sum of the third rotation angle and the preset angle, and a second sum of the remaining third rotation angles and the preset angle; determining a third difference between the first sum and the second sum, and determining a second absolute value of the third difference; determining a fourth difference between the preset angle and the second absolute value; The smaller value between the second absolute value and the fourth difference value is determined as the first angle difference.

5. The method according to claim 3 or 4, characterized in that: The method further comprises: When one of the third rotation angle and the remaining third rotation angles is a negative number and the other is a non-negative number, determining a third sum of the negative rotation angle and the preset angle; Determine a fifth difference between the third sum and the non-negative rotation angle, and determine a third absolute value of the fifth difference; determining a sixth difference between the preset angle and the third absolute value; The smaller value between the third absolute value and the sixth difference value is determined as the first angle difference.

6. The method according to claim 1, characterized in that The performing abnormality detection on the first rotation angle based on the reference rotation angle to obtain a detection result of the first rotation angle includes: determining a second angular difference between the first rotation angle and the reference rotation angle; When the second angle difference is less than a second angle threshold, determining that the detection result of the first rotation angle is normal; When the second angle difference is greater than or equal to the second angle threshold, the detection result is determined to be abnormal.

7. The method according to claim 6, characterized in that The method further comprises: When the detection result is normal, determining the first rotation angle as the updated first rotation angle; When the detection result is abnormal, the reference rotation angle is determined as the updated first rotation angle.

8. The method according to claim 7, characterized in that The method further comprises: Acquiring the position information, size information and category information of the object to be detected, as well as the preset position and the current position of the electronic device; Determine the updated first rotation angle, the position information, the size information and the category information as the recognition result of the object to be detected; Performing path planning based on the recognition result, the preset position and the current position to obtain a moving path of the electronic device; The electronic device is controlled to move based on the moving path until it reaches the preset position.

9. The method according to any one of claims 1 to 4, 6 to 8, characterized in that: The method further comprises: Obtaining a second dictionary, where the second dictionary is a dictionary corresponding to a timestamp before obtaining the image to be detected; storing the first identifier as a keyword in the second dictionary; The first rotation angle is stored as a value in the second dictionary to obtain the first dictionary.

10. The method according to any one of claims 1 to 4, 6 to 8, characterized in that: The method further comprises: For each of the second identifiers, when a second number of second rotation angles corresponding to the second identifier is greater than a second number threshold, obtaining a first timestamp corresponding to each of the second rotation angles; Sorting the second rotation angles in ascending order of the first timestamps to obtain sorted rotation angles; The first L second rotation angles in the sorted rotation angles are deleted from the first dictionary to obtain an updated first dictionary, where L is a positive integer.

11. The method according to any one of claims 1 to 4, 6 to 8, characterized in that: The method further comprises: For each of the second identifiers, obtaining a second timestamp of each second rotation angle corresponding to the second identifier; determining a maximum timestamp from among the second timestamps; When the time interval between the maximum timestamp and the current timestamp is greater than a time threshold, the second identifier and the second rotation angle corresponding to the second identifier are deleted from the first dictionary to obtain an updated first dictionary.

12. An abnormality detection device, characterized in that: The device comprises: A first acquisition module, used for acquiring an image to be detected, and determining a first identifier of an object to be detected included in the image to be detected and a first rotation angle of a detection frame of the object to be detected; A second acquisition module is used to acquire a first dictionary, wherein the first dictionary includes M second identifiers and a second rotation angle set corresponding to each second identifier, wherein the second rotation angle set includes second rotation angles corresponding to different timestamps; A first determining module, configured to determine a third rotation angle set corresponding to the first identifier from the M second rotation angle sets; A second determining module, configured to determine a reference rotation angle corresponding to the first identifier from the third rotation angle set when the number of elements in the third rotation angle set is greater than a first number threshold; A detection module is used to perform abnormality detection on the first rotation angle based on the reference rotation angle to obtain a detection result of the first rotation angle.

13. A computer device, characterized in that: The computer device comprises: A memory for storing computer executable instructions; A processor, configured to implement the anomaly detection method according to any one of claims 1 to 11 when executing the computer executable instructions stored in the memory.

14. A computer-readable storage medium storing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a processor, the anomaly detection method according to any one of claims 1 to 11 is implemented.

Citation Information

Cited By

  • Anomaly detection method and apparatus, computer device, and computer-readable storage medium

    WO2026145370A1