Search

CN-121999313-A - Inspection model training method, inspection device and electronic equipment

CN121999313ACN 121999313 ACN121999313 ACN 121999313ACN-121999313-A

Abstract

The invention provides a patrol model training method, a patrol device and electronic equipment, wherein the method comprises the steps of driving a machine dog to carry out mobile patrol on a sample park under a plurality of different patrol tasks to obtain sample video data of a target visual angle and time sequence synchronous metadata; the metadata comprises running state information and environment information of the machine dog, target detection label labeling is carried out on sample images in sample video data to obtain a first data set, dynamic enhancement is carried out on each sample image in the first data set according to the running state information to obtain a second data set, training weights corresponding to each sample image in the second data set are obtained according to the environment information, and the initialized detection model is trained according to the training weights and target detection loss values corresponding to each sample image in the second data set and output by the initialized detection model to obtain a patrol model. The invention improves the detection precision and suitability under low visual angle and complex dynamic environment.

Inventors

  • ZHANG XIAOXIAO

Assignees

  • 浪潮通信信息系统有限公司

Dates

Publication Date
20260508
Application Date
20251219

Claims (10)

  1. 1. The inspection model training method is characterized by comprising the following steps of: Driving a machine dog to carry out mobile inspection on a sample park under a plurality of different inspection tasks to obtain sample video data of a target visual angle and metadata synchronous with the time sequence of the sample video data, wherein the metadata comprises running state information and environment information of the machine dog, and the target visual angle is a body visual angle of the machine dog; Performing target detection label labeling on a sample image in the sample video data to obtain a first data set; Dynamically enhancing each sample image in the first data set according to the running state information to obtain a second data set; And according to the environment information, training weights corresponding to all sample images in the second data set are obtained, and according to the training weights and target detection loss values corresponding to all sample images in the second data set output by an initialization detection model, training the initialization detection model to obtain a patrol model.
  2. 2. The method for training a routing inspection model according to claim 1, wherein the obtaining training weights corresponding to each sample image in the second dataset according to the environmental information includes: Acquiring scene complexity and/or illumination conditions of each sample image in the second data set according to the environment information; And acquiring training weights corresponding to each sample image in the second data set according to the scene complexity and/or the illumination condition.
  3. 3. The method for training a routing inspection model according to claim 1, wherein dynamically enhancing each sample image in the first data set according to the operation state information to obtain a second data set includes: determining affine transformation parameters and motion blur kernel parameters of each sample image in the first data set according to the running state information; and carrying out data enhancement on each sample image in the first data set according to the affine transformation parameters and the motion blur kernel parameters to obtain the second data set.
  4. 4. A method for training a patrol model according to any one of claims 1-3, wherein said labeling the sample image in the sample video data with the target detection label to obtain a first data set comprises: preprocessing the sample video data to obtain a key frame sequence, wherein the preprocessing comprises slice archiving, resolution standardization processing and de-duplication processing; Performing target detection label labeling on the key frame sequence based on a target detection model to obtain simulation labels of all sample images in the key frame sequence; sending the simulation labels to all clients; When receiving a label correction instruction returned by any client for the simulated label, correcting the simulated label according to the label correction instruction; the corrected simulation labels are sent to the clients again, and label verification is carried out iteratively until verification passing instructions returned by all the clients are received; Determining the corrected simulated labels corresponding to the verification passing instruction as real labels of the sample images in the key frame sequence; And constructing the first data set according to each sample image in the key frame sequence and the real label.
  5. 5. A method of training a patrol model according to any one of claims 1-3 wherein the metadata further comprises location information of the machine dog; the step of obtaining the target detection loss value comprises the following steps: Inputting each sample image in the second data set into a feature extraction network of the initialization detection model to obtain feature images of different scales of each sample image in the second data set; Determining the weight coefficient of the feature map of each scale of each sample image in the second data set according to the position information; According to the weight coefficient, fusing a plurality of feature images with different scales of each sample image in the second data set to obtain a fused feature image; Inputting the fusion feature map to a detection network of the initialization detection model to obtain target detection results of all sample images in the second data set; And acquiring a target detection loss value corresponding to each sample image in the second data set according to the target detection result and the real label of each sample image in the second data set.
  6. 6. A method of training a patrol model according to any one of claims 1-3, wherein the plurality of different patrol tasks comprises a plurality of patrol tasks covering different areas, a plurality of patrol tasks covering different patrol periods, and a plurality of patrol tasks covering different patrol environments.
  7. 7. A method of inspection comprising: Acquiring an image to be detected of a current inspection angle of the machine dog; Inputting the image to be detected into a patrol model to obtain a target detection result of the image to be detected; When the target detection result indicates that an abnormal target exists, an alarm is sent out according to the type of the abnormal target; Wherein the inspection model is trained based on the inspection model training method as set forth in any one of claims 1-6.
  8. 8. The utility model provides a model trainer patrols and examines which characterized in that includes: The system comprises a first data acquisition module, a first data processing module and a second data processing module, wherein the first data acquisition module is used for driving a machine dog to carry out mobile inspection on a sample park under a plurality of different inspection tasks to obtain sample video data of a target visual angle and metadata synchronous with the time sequence of the sample video data; The first data management module is used for labeling target detection labels on sample images in the sample video data to obtain a first data set; The second data management module is used for dynamically enhancing each sample image in the first data set according to the running state information to obtain a second data set; And the optimization module is used for acquiring training weights corresponding to all sample images in the second data set according to the environmental information, and training the initialized detection model according to the training weights and target detection loss values corresponding to all sample images in the second data set output by the initialized detection model to obtain a patrol model.
  9. 9. A patrol device, comprising: The second data acquisition module is used for acquiring an image to be detected of the current inspection angle of the robot dog; the detection module is used for inputting the image to be detected into a patrol model to obtain a target detection result of the image to be detected; The alarm module is used for sending an alarm according to the type of the abnormal target when the target detection result indicates that the abnormal target exists; Wherein the inspection model is trained based on the inspection model training method as set forth in any one of claims 1-6.
  10. 10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the inspection model training method of any one of claims 1 to 6 or the inspection method of claim 7 when the computer program is executed by the processor.

Description

Inspection model training method, inspection device and electronic equipment Technical Field The invention relates to the technical field of intelligent monitoring, in particular to a patrol model training method, a patrol device and electronic equipment. Background Along with the continuous improvement of the intelligent level of intelligent park management, how to apply a visual inspection model to conduct intelligent patrol on the park is an important topic to be solved in the industry. Existing visual inspection models are typically built based on generic deep learning object detection algorithms. In order to obtain a detection model, the prior art generally directly collects video streams of a fixed security monitoring camera in a park as training samples, or performs training by using a public general image data set so as to obtain a detection model capable of identifying various targets in the park. However, since the fixed monitoring camera is usually located at a high position and is in a static state, the collected image has single visual angle, stable background and high target integrity, so that the detection model is difficult to fully learn the characteristic expression under the complex environment, the generalization capability of the detection model in the face of a non-standard visual angle and the complex dynamic environment is insufficient, the accurate detection result is difficult to be effectively output, and the problems of missed detection, false detection and the like in the actual park inspection are caused. Disclosure of Invention The invention provides a patrol model training method, a patrol device and electronic equipment, which are used for solving the defects that in the prior art, the generalization capability of a detection model is insufficient when the detection model faces a non-standard visual angle and a complex dynamic environment, and an accurate detection result is difficult to output effectively, so that the detection precision and the suitability under the non-standard visual angle and the complex dynamic environment are improved. The invention provides a patrol model training method, which comprises the following steps: Driving a machine dog to carry out mobile inspection on a sample park under a plurality of different inspection tasks to obtain sample video data of a target visual angle and metadata synchronous with the time sequence of the sample video data, wherein the metadata comprises running state information and environment information of the machine dog, and the target visual angle is a body visual angle of the machine dog; Performing target detection label labeling on a sample image in the sample video data to obtain a first data set; Dynamically enhancing each sample image in the first data set according to the running state information to obtain a second data set; And according to the environment information, training weights corresponding to all sample images in the second data set are obtained, and according to the training weights and target detection loss values corresponding to all sample images in the second data set output by an initialization detection model, training the initialization detection model to obtain a patrol model. According to the inspection model training method provided by the invention, the training weights corresponding to the sample images in the second data set are obtained according to the environmental information, and the method comprises the following steps: Acquiring scene complexity and/or illumination conditions of each sample image in the second data set according to the environment information; And acquiring training weights corresponding to each sample image in the second data set according to the scene complexity and/or the illumination condition. According to the inspection model training method provided by the invention, each sample image in the first data set is dynamically enhanced according to the running state information to obtain a second data set, and the method comprises the following steps: determining affine transformation parameters and motion blur kernel parameters of each sample image in the first data set according to the running state information; and carrying out data enhancement on each sample image in the first data set according to the affine transformation parameters and the motion blur kernel parameters to obtain the second data set. According to the inspection model training method provided by the invention, the target detection label marking is carried out on the sample image in the sample video data to obtain a first data set, and the method comprises the following steps: preprocessing the sample video data to obtain a key frame sequence, wherein the preprocessing comprises slice archiving, resolution standardization processing and de-duplication processing; Performing target detection label labeling on the key frame sequence based on a target detection model to obtain simulation labels