Target detection method, device, computer equipment and medium based on AR device

AR devices collect motion data to generate trajectory images and use lightweight target detection models, combined with multi-scale feature fusion and grouped convolution parallel networks, to solve the problem of low target recognition efficiency of AR devices and achieve efficient and accurate facility status. Detection and trajectory data acquisition, suitable for indoor environments.

CN118072390BActive Publication Date: 2024-09-03BEIJING JRUNION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410203071.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-23
Publication Date
2024-09-03
Estimated Expiration
2044-02-23

AI Technical Summary

Technical Problem

The target recognition efficiency based on AR devices in the existing technology is low, and there are problems such as delay and reduced recognition accuracy. Especially when the indoor GPS signal is weak or no signal, it is difficult to accurately obtain positioning data and trajectory display.

Method used

Collect the motion data of inspection personnel through AR equipment, generate detection trajectory images, determine whether they have passed through the facility to be inspected, and use a lightweight target detection model to perform target detection on three-dimensional image data, combined with multi-scale feature fusion and grouped convolution parallel network structure , improve detection speed and accuracy, and use other coordinate acquisition methods to integrate position data to ensure the accuracy of trajectory data.

Benefits of technology

It improves the accuracy and efficiency of target detection under the condition of AR equipment, reduces the types of equipment, provides intuitive detection trajectory display and real-time alarm notification, and enhances the comprehensiveness and reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118072390B
    Figure CN118072390B
Patent Text Reader

Abstract

The embodiment of the present invention provides a target detection method, device, computer equipment and medium based on AR equipment, which relates to the field of image processing technology, wherein the method includes the following steps: using AR equipment to collect motion data of the detection personnel during the movement of the detection personnel; visually generating a detection trajectory image of the detection personnel in a map through the motion data; judging whether the detection personnel has passed through the facility to be detected according to the detection trajectory image; if the detection personnel has passed through the facility to be detected, obtaining three-dimensional image data of the facility to be detected through the AR equipment, using a lightweight target detection model to perform target detection on the three-dimensional image data, and obtaining a target detection result. Since the scheme uses the AR equipment to perform target detection on the facility to be detected and generate a detection trajectory image, the types of equipment used for detection are reduced, and the accuracy and efficiency of target detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an AR device-based target detection method, device, computer equipment and medium. Background Art

[0002] Traditional facility inspections often require inspectors to manually judge video data, and the various instruments and equipment in the station also require personnel to record and analyze abnormalities through manual inspection. The workload of manual inspection is extremely heavy, and it will also lead to abnormal analysis and judgment, or even misjudgment, caused by manual analysis. Even if various electronic devices are used for video acquisition and analysis, inspectors are usually required to carry various equipment, such as high-definition cameras, positioning instruments, etc.

[0003] Using AR technology, inspectors can intuitively obtain equipment information and operation instructions. However, when only using AR devices, target detection based on AR devices is usually subject to the performance of AR devices. For the demand for real-time detection and identification of the status of the facilities to be inspected, there are delays or freezes, making it urgent to improve the speed of target detection and identification. At the same time, while the detection and identification speed is improved, it usually causes a decrease in recognition accuracy. Therefore, the detection and identification method needs to be lightweight while improving the detection accuracy.

[0004] At the same time, there may be situations where there is no GPS signal on the detection trajectory, and when the detection location is indoors, the GPS signal will be weakened or even unusable. How to obtain accurate positioning data using only AR devices has also become a problem that needs to be solved. In addition, the existing trajectory display method is single and cannot be accurately visualized. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a target detection method based on an AR device to solve the technical problem of low target recognition efficiency based on an AR device in the prior art. The method includes:

[0006] When the inspector is moving, use the AR device to collect the inspector's motion data;

[0007] Generate a detection trajectory image of the detection personnel visually on the map through motion data;

[0008] Determine whether the inspector has passed through the facility to be inspected based on the inspection trajectory image;

[0009] If the inspector passes by the facility to be inspected, the three-dimensional image data of the facility to be inspected is obtained through the AR device, and the lightweight target detection model is used to perform target detection on the three-dimensional image data to obtain the target detection result, wherein the target detection result is used to determine the status of the facility to be inspected.

[0010] The embodiment of the present invention also provides a target detection device based on an AR device to solve the technical problem of low target recognition efficiency based on an AR device in the prior art. The device includes:

[0011] The motion data collection module is used to collect the motion data of the inspected person using the AR device while the inspected person is moving;

[0012] A trajectory image generation module, used to visually generate a detection trajectory image of a detection person in a map through motion data;

[0013] A detection judgment module is used to judge whether the detection personnel have passed through the facility to be detected based on the detection trajectory image;

[0014] The target detection module is used to obtain three-dimensional image data of the facilities to be inspected through the AR device when the inspection personnel pass by the facilities to be inspected, and use the lightweight target detection model to perform target detection on the three-dimensional image data to obtain the target detection result, wherein the target detection result is used to judge the status of the facilities to be inspected.

[0015] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any of the above-mentioned target detection methods based on an AR device is implemented to solve the technical problem of low efficiency of target recognition based on an AR device in the prior art.

[0016] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program for executing any of the above-mentioned target detection methods based on AR devices, so as to solve the technical problem of low efficiency of target recognition based on AR devices in the prior art.

[0017] Compared with the prior art, the at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects:

[0018] By using AR devices to detect targets on facilities to be inspected, the types of equipment used for detection are reduced. The use of lightweight target detection models improves the accuracy and efficiency of target detection. The detection trajectory images generated based on the motion data of the inspectors can accurately and visually display the detection movement status, providing a reference and guiding data basis for further improving the accuracy and efficiency of target detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 is a flow chart of a target detection method based on an AR device provided by an embodiment of the present invention;

[0021] Figure 2 is a structural block diagram of a computer device provided by an embodiment of the present invention;

[0022] Figure 3 It is a structural block diagram of an AR device-based target detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0024] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.

[0025] In an embodiment of the present invention, a target detection method based on an AR device is provided, such as Figure 1 As shown, the method includes:

[0026] Step S101: While the detected person is moving, using the AR device to collect motion data of the detected person;

[0027] Step S102: Visually generate a detection trajectory image of the detection person in a map using the motion data;

[0028] Step S103: judging whether the inspected person has passed through the facility to be inspected according to the inspection trajectory image;

[0029] Step S104: If the inspection personnel passes by the facility to be inspected, the three-dimensional image data of the facility to be inspected is obtained through the AR device, and a lightweight target detection model is used to perform target detection on the three-dimensional image data to obtain a target detection result, wherein the target detection result is used to determine the status of the facility to be inspected.

[0030] In the specific implementation, in order to determine the status of the facility through the image data of the facility to be detected, the following steps are used to use the lightweight target detection model to perform target detection on the image data, and the status of the facility to be detected is determined according to the target detection results:

[0031] The three-dimensional image data is divided into multiple grid images, and a group convolution parallel network is used to extract features from the multiple grid images respectively to generate multiple feature maps. Multi-scale feature fusion is performed on the multiple feature maps to generate a fused feature map, wherein each group of group convolutions corresponds to a receptive field; a single detection head is used to perform target detection on the fused feature map, and all prediction boxes are marked in the three-dimensional image data; it is determined whether the prediction confidence of each prediction box exceeds a set threshold, and if it exceeds the set threshold, it is determined that there is a target in the prediction box, and the position of the target is obtained; according to the non-maximum suppression algorithm, the prediction boxes with targets in the three-dimensional image data are screened, and repeated prediction boxes corresponding to the same target are eliminated to generate a screened prediction box, and according to the classification probability of the screened prediction box, the index corresponding to the maximum probability is obtained as the classification index number of the target, thereby obtaining the category information of the target, wherein the target detection result includes the position of the target, the size of the prediction box and the category information.

[0032] Specifically, through target detection of the facilities to be inspected, the status information of the facilities to be inspected (including dial data, color of indicator lights, whether the facilities are turned on, whether there are emergencies such as fires near the facilities, etc.) can be detected.

[0033] Specifically, the detection model usually uses multiple detection heads to detect objects of different scales (objects of different scales require different receptive fields, and the receptive fields of each layer of the model are different). However, in order to improve the running speed of AR devices and simplify the post-processing steps, a grouped convolutional parallel network structure is adopted, which can fuse the features of different receptive fields, so that a single detection head can also adapt to the detection of objects of different scales.

[0034] In the specific implementation, in order to improve the recognition speed and accuracy of the target detection model in target detection, the following steps are performed to select the candidate prediction box:

[0035] Before performing target detection on three-dimensional image data, the feature points in the fused feature map are matched one by one with the candidate prediction boxes. When using the grouped convolutional parallel network to extract features from multiple grid images respectively, the center point grid image where the target center point is located and the three grids around the center point grid image are used as candidate prediction boxes for positive samples.

[0036] Specifically, the feature points in the fused feature map are the needles, digital displays, status indicator lights, etc. of the facilities to be tested, the features of normal conditions (such as the position of the gate), and the features of unexpected conditions (such as the feature points of fire).

[0037] Specifically, before performing object detection on the image data, the center point and size of the target are predicted directly on the feature map (directly regressing to the ratio of the width and height of the feature map, without the need for prior width and height). This method simplifies the post-processing steps of object detection and improves the inference speed. Each feature point corresponds to only one candidate box.

[0038] Specifically, the target detection model adopts a cross-grid multiple candidate target method. Not only the grid where the target center point is located is used as a candidate target, but also the three surrounding grids, thereby increasing the number of positive sample candidate boxes. Increasing the number of positive sample candidate boxes helps to improve the coverage and accuracy of detection, especially for targets located at the edge of the grid. In this way, targets of various scales and positions can be captured more effectively. By increasing the number of positive sample candidate boxes, the model's ability to detect edge targets is improved, thereby improving coverage while also enhancing detection accuracy.

[0039] In a specific implementation, in order to improve the flexibility and accuracy of model training, the following steps are performed before using the lightweight target detection model to perform target detection on the image data, and the lightweight target detection model is trained, wherein the process of training the model includes the following steps:

[0040] Collect three-dimensional image data of the facilities to be detected under different scenes and different lighting conditions, annotate the collected three-dimensional image data to generate three-dimensional image data with real annotation boxes, convert the annotated three-dimensional image data into an image format suitable for the lightweight target detection model, and form a training set with the three-dimensional images after format conversion; dynamically adjust the loss threshold of positive and negative samples when using the training set for each training, and determine whether the sample is a positive sample or a negative sample through the loss threshold; calculate the angle loss, distance loss, shape loss and intersection-over-union loss of the predicted box and the real annotation box of the facility to be detected respectively, construct a loss function through the angle loss, distance loss, shape loss and intersection-over-union loss, and use the loss function to adjust the parameters of the lightweight target detection model.

[0041] Specifically, the loss values ​​of multiple predicted boxes and true labeled boxes in the previous training are calculated, and the above loss values ​​are averaged. The calculated loss mean is used as the loss threshold for assigning positive and negative samples. When the loss value of the current predicted box and the true labeled box in this training is greater than the loss threshold, the sample is a positive sample, otherwise it is a negative sample. That is, in the training of the model, the loss threshold used in each training is different. This method improves the flexibility and accuracy of model training.

[0042] In specific implementation, in order to achieve dynamic allocation of positive and negative samples (that is, in the training of the model, the loss threshold used in each training is different), the following steps are performed to dynamically adjust the loss threshold of positive and negative samples, and determine whether the sample is a positive sample or a negative sample by the loss threshold:

[0043] The average loss of multiple prediction boxes and true annotation boxes in the last training is used as the loss threshold, and the loss value of the current prediction box and the true annotation box is used as the current loss value; if the current loss value is higher than the loss threshold, the current prediction box is a positive sample, and if the current loss value is lower than the loss threshold, the current prediction box is a negative sample.

[0044] Specifically, in common target detection algorithms, the assignment of positive and negative samples is determined based on the intersection-over-union (IoU) between the anchor box and the true target box. During model training, each anchor box will calculate the IoU with all true target boxes, and the anchor box will be assigned as a positive sample or a negative sample based on the size of the IoU. If the IoU of an anchor box exceeds a preset threshold, the anchor box is a positive sample; otherwise, the anchor box is a negative sample. This method of determining positive and negative samples is fixed during model training (i.e., the preset threshold is fixed) and will not change as training progresses.

[0045] In specific implementation, in order to obtain trajectory data using only an AR device, the following steps are performed to collect the motion data of the detected person using the AR device during the movement of the detected person:

[0046] The gait data and walking distance of the inspected person are obtained through the acceleration sensor in the AR device, and the estimated step length is calculated through the gait data and walking distance; the estimated direction of the inspected person is obtained through the gyroscope in the AR device; the initial position of the inspected person is obtained, and the moving position of the inspected person is calculated based on the initial position of the inspected person using the estimated step length and the estimated direction, and the multiple moving position data passed by the inspected person during the inspection time are formed into a position set, and the motion data is generated based on the coordinates of the moving positions in the position set in the spatial coordinate system; when there are other coordinate collection methods for the position of the inspected person except the method of determining the position coordinates based on the motion data , select several positions from the last detection trajectory data as reference positions, and calculate the difference between the coordinates of the reference positions and the coordinate data of this detection respectively; loop all coordinate acquisition methods, compare the difference and the set threshold value, if the difference is less than the set threshold value, judge that the current coordinate acquisition method is trustworthy; according to the position coordinates collected by each coordinate acquisition method judged to be trustworthy, generate motion data corresponding to each coordinate acquisition method; after weighting the trajectory data corresponding to all coordinate acquisition methods judged to be trustworthy according to different weights, integrate the detection trajectory data and the trajectory data corresponding to all coordinate acquisition methods judged to be trustworthy into the final motion data.

[0047] Specifically, detection often encounters situations where the global satellite system signal is blocked by the surrounding environment such as indoors, on sparsely populated paths, and near buildings. In order to deal with this situation, it is necessary to obtain location data through AR devices.

[0048] In the specific implementation, in order to improve the accuracy of the detection trajectory data, the detection trajectory data is corrected by using other coordinate collection methods through the following steps:

[0049] Specifically, other coordinate collection methods include global navigation satellite systems, Wi-Fi-based navigation systems, and Bluetooth location collection.

[0050] Specifically, since the detection path usually has a certain degree of repeatability, when the AR device detects that there are other coordinate collection methods, the detection trajectory data is integrated and corrected through other coordinate collection methods. First, several positions are determined on the detection path as reference positions (the reference positions are selected from the previous detection data), and a preset threshold is set. The credibility of the coordinate data collected by other coordinate collection methods is judged by the preset threshold. If the other coordinate collection methods are credible, the coordinates collected by the several methods are fused. Generally speaking, navigation systems based on Wi-Fi and Bluetooth location collection are more credible indoors, and global navigation satellite systems are more credible outdoors. At the same time, the strength of Wi-Fi, Bluetooth, and global navigation satellites also affects the credibility, and the credibility is higher when the signal strength is high.

[0051] In the specific implementation, in order to display the motion data more intuitively, the following steps are used to generate a detection trajectory image of the detection personnel in a map visually through the motion data:

[0052] Generate trajectory lines in the map according to the motion data; set image labels and generate image labels at the coordinate points of the facilities to be inspected in the map; after selecting the image labels, display the facility image data corresponding to the image labels, and the facility image data include three-dimensional image data of the facilities to be inspected and image data of the surrounding environment of the facilities to be inspected collected by the AR device; use the trajectory lines, image labels and facility image data as the inspection trajectory images of the inspectors.

[0053] Specifically, during the inspection, electronic fences can be used to locate the facilities to be inspected (for example, in a multi-story computer room in a building, the collected coordinate data usually overlaps), and electronic fences can be used to distinguish different floors and thus different facilities to be inspected. The coordinate data of the facilities to be inspected is obtained by setting up electronic fences around the facilities to be inspected, and whether the coordinate data of the facilities to be inspected overlaps with the detection trajectory image is used to determine whether the inspector has passed through the facilities to be inspected.

[0054] Specifically, when a problem is found during detection, the server can be notified of the alarm information in a timely manner, and the generated detection report is sent to the server, so that other users can browse and analyze the detection content.

[0055] In this embodiment, a computer device is provided, such as Figure 2 As shown, it includes a memory 201, a processor 202, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any of the above-mentioned target detection methods based on an AR device is implemented.

[0056] Specifically, the computer device may be a computer terminal, a server or a similar computing device.

[0057] In this embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program for executing any of the above-mentioned target detection methods based on an AR device.

[0058] Specifically, computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable storage media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0059] Based on the same inventive concept, an object detection device based on an AR device is also provided in an embodiment of the present invention, as described in the following embodiments. Since the principle of solving the problem by the object detection device based on an AR device is similar to that of the object detection method based on an AR device, the implementation of the object detection device based on an AR device can refer to the implementation of the object detection method based on an AR device, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0060] Figure 3 is a structural block diagram of a target detection device based on an AR device according to an embodiment of the present invention. Figure 3 As shown, it includes: a motion data acquisition module 301, a trajectory image generation module 302, a detection and judgment module 303 and a target detection module 304. The structure is described below.

[0061] The motion data collection module 301 is used to collect the motion data of the detected person using the AR device during the movement of the detected person;

[0062] A track image generating module 302, configured to generate a detection track image of the detection person visually in a map using the motion data;

[0063] A detection judgment module 303 is used to judge whether the detection person has passed through the facility to be detected according to the detection trajectory image;

[0064] The target detection module 304 is used to obtain the three-dimensional image data of the facility to be inspected through the AR device if the inspection personnel passes by the facility to be inspected, and use a lightweight target detection model to perform target detection on the three-dimensional image data to obtain a target detection result, wherein the target detection result is used to determine the status of the facility to be inspected.

[0065] In one embodiment, the target detection module includes:

[0066] A feature fusion unit is used to divide the three-dimensional image data into multiple grid images, use a grouped convolution parallel network to extract features from the multiple grid images respectively to generate multiple feature maps, perform multi-scale feature fusion on the multiple feature maps, and generate a fused feature map, wherein each group of grouped convolutions corresponds to a receptive field;

[0067] A prediction box annotation unit is used to perform target detection on the fused feature map using a single detection head and annotate all prediction boxes in the three-dimensional image data;

[0068] The target position acquisition unit is used to determine whether the prediction confidence of each prediction box exceeds the set threshold. If it exceeds the set threshold, it is determined that there is a target in the prediction box and the position of the target is obtained;

[0069] The category information acquisition unit is used to filter the prediction boxes containing targets in the three-dimensional image data according to the non-maximum suppression algorithm, eliminate the repeated prediction boxes corresponding to the same target, generate the filtered prediction boxes, and obtain the index corresponding to the maximum probability according to the classification probability of the filtered prediction boxes as the classification index number of the target, thereby obtaining the category information of the target, wherein the target detection result includes the position of the target, the size of the prediction box and the category information.

[0070] In one embodiment, the target detection module further includes:

[0071] A feature point correspondence unit, used to correspond feature points in the fused feature map to candidate prediction boxes one by one before performing target detection on the three-dimensional image data;

[0072] The candidate prediction box selection unit is used to use the center point grid image where the target center point is located and three grid images around the center point grid image as candidate prediction boxes of positive samples when using a grouped convolutional parallel network to extract features from multiple grid images respectively.

[0073] In one embodiment, the target detection module further includes:

[0074] Before the training model unit is used to perform target detection on three-dimensional image data using the lightweight target detection model, the process of training the lightweight target detection model includes the following steps:

[0075] A training set generation unit is used to collect three-dimensional image data of the facilities to be detected under different scenes and different illuminations, generate three-dimensional image data with real annotation frames after annotating the collected three-dimensional image data, convert the annotated three-dimensional image data into an image format suitable for the lightweight target detection model, and form the three-dimensional images after format conversion into a training set;

[0076] A positive and negative sample determination unit, used to dynamically adjust the loss threshold of positive and negative samples during each training using the training set, and determine whether the sample is a positive sample or a negative sample according to the loss threshold;

[0077] The loss function construction unit is used to respectively calculate the angle loss, distance loss, shape loss and intersection-over-union loss of the predicted box and the real annotation box of the facility to be detected, construct the loss function through the angle loss, distance loss, shape loss and intersection-over-union loss, and use the loss function to adjust the parameters of the lightweight object detection model.

[0078] In one embodiment, the positive and negative sample determination unit is used to use the average loss of multiple prediction boxes and true labeled boxes in the last training as the loss threshold, and use the loss value of the current prediction box and the true labeled box as the current loss value; if the current loss value is higher than the loss threshold, the current prediction box is a positive sample, and if the current loss value is lower than the loss threshold, the current prediction box is a negative sample.

[0079] In one embodiment, the motion data collection module includes:

[0080] An estimated step length calculation unit is used to obtain the gait data and walking distance of the detected person through the acceleration sensor in the AR device, and calculate the estimated step length through the gait data and walking distance;

[0081] A unit for obtaining a calculated position is used to obtain a calculated position of a detection person through a gyroscope in an AR device;

[0082] The detection trajectory generating unit is used to obtain the initial position of the detection person, and calculate the moving position of the detection person according to the initial position of the detection person by using the estimated step length and the estimated direction, and form a position set with multiple moving position data of the detection person during the detection time, and generate motion data according to the coordinates of the moving positions in the position set in the spatial coordinate system;

[0083] A detection status judging unit is used to obtain the coordinate data of the facility to be detected through the electronic fence set around the facility to be detected, and judge whether the detection personnel have passed through the facility to be detected according to whether the coordinate data of the facility to be detected coincides with the detection trajectory data;

[0084] A difference calculation unit, used for selecting several positions from the last detection trajectory data as reference positions when there is a method for collecting coordinates of the position of the detected person other than the method for determining the position coordinates according to the motion data, and respectively calculating the difference between the coordinates of the reference positions and the coordinate data of the current detection;

[0085] A trust determination unit is used to loop through all coordinate acquisition methods, compare the difference with a set threshold, and if the difference is less than the set threshold, determine that the current coordinate acquisition method is trustworthy;

[0086] A trusted trajectory acquisition unit, used to generate motion data corresponding to each coordinate acquisition method according to the position coordinates acquired by each coordinate acquisition method determined to be trusted;

[0087] The final detection trajectory generating unit is used to weight the trajectory data corresponding to all the coordinate acquisition methods judged to be trustworthy according to different weights, and integrate the detection trajectory data and the trajectory data corresponding to all the coordinate acquisition methods judged to be trustworthy into the final motion data.

[0088] In one embodiment, the trajectory image generation module includes:

[0089] A track line generating unit, used for generating track lines in a map according to the motion data;

[0090] An image identifier generating unit, used to set an image identifier, generate an image identifier at the coordinate point of the facility to be detected in the map, and after selecting the image identifier, display the facility image data corresponding to the image identifier, the facility image data including the three-dimensional image data of the facility to be detected collected by the AR device and the image data of the surrounding environment of the facility to be detected;

[0091] The detection track image generating unit is used to use the track lines, image marks, and facility image data as the detection track image of the detection personnel.

[0092] The embodiments of the present invention achieve the following technical effects:

[0093] By using AR devices to detect targets and generate detection trajectory images, the types of equipment used for detection are reduced, and the accuracy and efficiency of detection are improved. When problems are found during detection, the server side can be notified of the alarm information in a timely manner, and the generated detection report can be sent to the server side, allowing other users to browse and analyze the detection content.

[0094] The AR-based device detection method has multiple advantages, including improving efficiency, enhancing accuracy, achieving remote collaboration, and optimizing computing power. First, this method can significantly improve detection efficiency. Using AR devices, operators can intuitively obtain device information and operation instructions without frequently switching perspectives or operating other devices, thereby simplifying the operation process and reducing detection time. Secondly, the AR-based device detection method can improve detection accuracy. By using AR devices to obtain environmental information and device images in real time, combined with real-time recognition and computing power optimization methods, the device status can be accurately identified and real-time feedback can be provided, which helps to discover potential problems in a timely manner and improve the accuracy and comprehensiveness of detection. Thirdly, real-time recognition and data processing are achieved by using computing power optimization and lightweight algorithms, which effectively reduces the computing burden of AR devices, improves the stability and performance of the system, and provides reliable technical support for device detection. Finally, motion trajectory data can be obtained only through AR devices. If there are other highly reliable coordinate acquisition methods, the final trajectory data can also be obtained by combining other coordinate acquisition methods, which improves the accuracy of trajectory data. When used with electronic fences, different floors of the same building can be distinguished, which further improves the accuracy of trajectory data.

[0095] By visually displaying the motion data on the map, the motion data and the three-dimensional image data of the facility to be detected including the detection trajectory image and the image data of the surrounding environment of the facility to be detected can be more intuitively seen.

[0096] The target detection method based on AR devices has many advantages such as improving efficiency, enhancing accuracy, realizing remote collaboration and optimizing computing power. It has brought new technical means and solutions to facility detection and is expected to be widely used in industries such as industry and manufacturing.

[0097] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present invention are not limited to any specific combination of hardware and software.

[0098] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A target detection method based on AR device, characterized in that: include: When the detection person moves, the AR device is used to collect the motion data of the detection person; Visually generating a detection trajectory image of the detection person in a map through the motion data; Determining whether the inspected person has passed through the facility to be inspected according to the inspection trajectory image; If the inspector passes by the facility to be inspected, the three-dimensional image data of the facility to be inspected is obtained through the AR device, and a lightweight target detection model is used to perform target detection on the three-dimensional image data to obtain a target detection result, wherein the target detection result is used to determine the status of the facility to be inspected; Using a lightweight target detection model to perform target detection on the three-dimensional image data to obtain a target detection result, including: Dividing the three-dimensional image data into a plurality of grid images, using a grouped convolutional parallel network to extract features from the plurality of grid images respectively to generate a plurality of feature maps, performing multi-scale feature fusion on the plurality of feature maps to generate a fused feature map, wherein each group of grouped convolutions corresponds to a receptive field; Using a single detection head to perform target detection on the fused feature map, and marking all prediction boxes in the three-dimensional image data; Determine whether the prediction confidence of each prediction box exceeds a set threshold. If it exceeds the set threshold, determine that there is a target in the prediction box and obtain the position of the target; According to the non-maximum suppression algorithm, the prediction boxes containing targets are screened in the three-dimensional image data, and repeated prediction boxes corresponding to the same target are eliminated to generate screened prediction boxes. According to the classification probabilities of the screened prediction boxes, an index corresponding to the maximum probability is obtained as the classification index number of the target, thereby obtaining the category information of the target, wherein the target detection result includes the position of the target, the size of the prediction box and the category information.

2. The target detection method based on AR device according to claim 1, characterized in that: Also includes: Before performing target detection on the three-dimensional image data, the feature points in the fused feature map are matched one by one with the candidate prediction boxes; When the grouped convolutional parallel network is used to extract features from the plurality of grid images respectively, the center point grid image where the target center point is located and three grid images surrounding the center point grid image are used as candidate prediction boxes for positive samples.

3. The target detection method based on AR device according to claim 1, characterized in that: Also includes: Before using the lightweight object detection model to perform object detection on the three-dimensional image data, the process of training the lightweight object detection model includes the following steps: Collecting three-dimensional image data of the facility to be detected under different scenes and different illuminations, annotating the collected three-dimensional image data to generate three-dimensional image data with a real annotation frame, converting the annotated three-dimensional image data into an image format suitable for the lightweight object detection model, and forming a training set with the three-dimensional images after format conversion; When performing each training using the training set, dynamically adjusting the loss threshold of positive and negative samples, and determining whether a sample is a positive sample or a negative sample according to the loss threshold; The angle loss, distance loss, shape loss and intersection-over-union loss of the predicted box and the real labeled box of the facility to be detected are calculated respectively, a loss function is constructed by the angle loss, the distance loss, the shape loss and the intersection-over-union loss, and the loss function is used to adjust the parameters of the lightweight object detection model.

4. The target detection method based on AR device according to claim 3, characterized in that: Dynamically adjust the loss threshold of positive and negative samples, and determine whether a sample is a positive sample or a negative sample by the loss threshold, including: The average loss value between the multiple predicted boxes and the true labeled boxes in the previous training is used as the loss threshold, and the loss value between the current predicted box and the true labeled box is used as the current loss value; If the current loss value is higher than the loss threshold, the current prediction box is a positive sample; if the current loss value is lower than the loss threshold, the current prediction box is a negative sample.

5. The target detection method based on AR device according to claim 1, characterized in that: During the movement of the detection person, using the AR device to collect the motion data of the detection person includes: Obtaining the gait data and walking distance of the detected person through the acceleration sensor in the AR device, and calculating the estimated stride length through the gait data and the walking distance; Obtaining the estimated position of the detected person through the gyroscope in the AR device; Obtaining the initial position of the detected person, calculating the moving position of the detected person according to the initial position of the detected person using the calculated step length and the calculated orientation, forming a position set with multiple moving position data of the detected person during the detection time, and generating motion data according to the coordinates of the moving positions in the position set in the spatial coordinate system; When there is a coordinate acquisition method other than the method of determining the position coordinates according to the motion data for the position of the detected person, select several positions from the previous motion data as reference positions, and calculate the difference between the coordinates of the reference positions and the coordinate data of the current detection respectively; Loop through all coordinate acquisition methods, compare the difference with a set threshold, and if the difference is smaller than the set threshold, determine that the current coordinate acquisition method is trustworthy; Generate motion data corresponding to each coordinate collection method according to the position coordinates collected by each coordinate collection method determined to be trustworthy; After weighting the trajectory data corresponding to all coordinate collection methods determined to be trustworthy according to different weights, the detection trajectory data and the motion data corresponding to all coordinate collection methods determined to be trustworthy are integrated into final motion data.

6. The target detection method based on an AR device as claimed in any one of claims 1, characterized in that: Visually generating a detection trajectory image of the detection person in a map through the motion data includes: generating a trajectory line in a map according to the motion data; Setting an image identifier, generating the image identifier at the coordinate point of the facility to be detected in the map, and after selecting the image identifier, displaying the facility image data corresponding to the image identifier, wherein the facility image data includes the three-dimensional image data of the facility to be detected and the image data of the surrounding environment of the facility to be detected collected by the AR device; The trajectory line, the image mark, and the facility image data are used as the detection trajectory image of the detection person.

7. A target detection device based on an AR device, characterized in that: include: A motion data collection module, used to collect motion data of the detected person using the AR device during the movement of the detected person; A trajectory image generation module, used to visually generate a detection trajectory image of the detection person in a map through the motion data; A detection judgment module, used to judge whether the detection person has passed through the facility to be detected according to the detection trajectory image; a target detection module, configured to obtain three-dimensional image data of the facility to be inspected through the AR device if the inspector passes by the facility to be inspected, and perform target detection on the three-dimensional image data using a lightweight target detection model to obtain a target detection result, wherein the target detection result is used to determine the status of the facility to be inspected; Object detection module, including: A feature fusion unit, used to divide the three-dimensional image data into a plurality of grid images, extract features from the plurality of grid images using a grouped convolutional parallel network to generate a plurality of feature maps, perform multi-scale feature fusion on the plurality of feature maps to generate a fused feature map, wherein each group of grouped convolutions corresponds to a receptive field; A prediction box labeling unit, used for performing target detection on the fused feature map using a single detection head, and labeling all prediction boxes in the three-dimensional image data; A target position acquisition unit, used to determine whether the prediction confidence of each prediction frame exceeds a set threshold, and if it exceeds the set threshold, determine that there is a target in the prediction frame and obtain the position of the target; A category information acquisition unit is used to filter the prediction boxes where targets exist in the three-dimensional image data according to a non-maximum suppression algorithm, eliminate repeated prediction boxes corresponding to the same target, generate filtered prediction boxes, and obtain an index corresponding to the maximum probability according to the classification probability of the filtered prediction boxes as the classification index number of the target, thereby obtaining the category information of the target, wherein the target detection result includes the position of the target, the size of the prediction box and the category information.

8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the target detection method based on an AR device according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the target detection method based on an AR device according to any one of claims 1 to 6.