Motor vibration detection method and device, storage medium and computer device
By using video segmentation and feature point extraction methods, the problem of low accuracy in non-contact motor vibration detection was solved, and high-precision detection of motor vibration frequency and amplitude was achieved.
Patent Information
- Application Number
- CN202411552081.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-11-01
AI Technical Summary
In existing non-contact motor vibration detection technologies, there is a lot of invalid information in the data, resulting in low detection accuracy.
A video segmentation model is used to segment motor images, extract feature points, form point pairs, and extract vibration frequency and vibration amplitude through similarity calculation and probability distribution modeling.
It improves the accuracy of motor vibration detection, eliminates background interference, and enhances the robustness and accuracy of the detection.
Smart Images

Figure CN119445445B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vibration detection, and particularly relates to a motor vibration detection method and device, a storage medium and computer equipment. BACKGROUND
[0002] Detecting the running frequency of a motor can effectively determine the running state of the motor, so as to timely give a warning for the abnormal state of the motor. GB10068-2000 'Rotating Machine Vibration Limit and Test Method' stipulates the vibration limit of a motor with different center heights on a rigid base, a measurement method and a judgment standard of the rigid base, and according to the standard, it can be determined whether the motor meets the standard. Therefore, measuring the vibration frequency of the motor has important application value in the field of motor abnormal diagnosis.
[0003] A conventional motor frequency measurement scheme needs to install a vibration measurement sensor, such as a displacement sensor or an acceleration sensor, on the motor, so as to calculate the vibration frequency of the motor. However, installing a sensor on the motor has many inconvenient factors, especially some contact sensors may interfere with the normal operation of the motor. In order to overcome the defects brought by the contact vibration detection, the vibration of the motor can be detected by a non-contact detection method. However, when the non-contact vibration detection is applied, there is much invalid information in the collected data, which leads to low accuracy of the vibration detection of the motor. SUMMARY
[0004] The present application aims to at least solve one of the above technical defects, in particular, the technical defect that when the non-contact vibration detection is applied in the prior art, there is much invalid information in the collected data, which leads to low accuracy of the vibration detection of the motor.
[0005] In a first aspect, the present application provides a motor vibration detection method, which comprises:
[0006] obtaining a to-be-detected video;
[0007] segmenting a motor object in each frame of image in the to-be-detected video by using a preset video segmentation model to obtain a motor image set formed by motor images corresponding to each frame of image;
[0008] extracting feature points from each motor image in the motor image set to obtain a plurality of feature points corresponding to each motor image, and determining a point pair set corresponding to the motor image set according to the plurality of feature points of adjacent motor images in the motor image set;
[0009] calculating the similarity of each pair of points in the point pair set respectively, and selecting N pairs of points with the highest similarity to form a feature point pair set;
[0010] After the set of feature point pairs is modeled by a probability distribution to obtain a discrete Gaussian distribution sequence corresponding to the set of feature point pairs, vibration features are extracted from the discrete Gaussian distribution sequence and mapped to obtain a vibration frequency and a vibration amplitude.
[0011] In one of the embodiments, the motor object in each frame of image in the to-be-detected video is segmented by using the preset video segmentation model to obtain a motor image set formed by motor images corresponding to each frame of image, which includes:
[0012] The preset video segmentation model is determined.
[0013] The to-be-detected video is segmented into picture frames according to a capture frame rate of the to-be-detected video to obtain each frame of image in the to-be-detected video.
[0014] The segmentation prompt points are acquired, and the segmentation prompt points and each frame of image are input into the video segmentation model to segment the motor object in each frame of image according to the segmentation prompt points to obtain the motor image corresponding to each frame of image.
[0015] The motor image set is generated based on each motor image.
[0016] In one of the embodiments, the vibration features are extracted from the Gaussian distribution sequence and mapped to obtain a vibration frequency and a vibration amplitude, which includes:
[0017] The preset vibration detection model is determined; the vibration detection model includes a multi-layer convolutional network and a multi-layer perceptron module.
[0018] The multi-layer convolutional network is used to extract features from the Gaussian distribution sequence to obtain a feature matrix, and the feature matrix is straightened to obtain vibration features.
[0019] The vibration features are input into the perceptron module for feature mapping to obtain a vibration frequency and a vibration amplitude.
[0020] In one of the embodiments, the feature points are extracted from each motor image in the motor image set to obtain a plurality of feature points corresponding to each motor image, which includes:
[0021] The threshold value parameters of each region in the motor image are determined according to the image parameters of each motor image in the motor image set.
[0022] Each motor image is preprocessed to highlight the main features of each motor image.
[0023] For each pre-processed motor image, each pixel point of the motor image is traversed, if the absolute value of the difference between the gray value of the pixel point and the gray value of the surrounding pixel point of the pixel point is less than the threshold parameter of the surrounding pixel point of the region where the pixel point is located, and the surrounding pixel point is greater than a preset threshold, the pixel point is determined as a feature point, and after the motor image is traversed, a plurality of feature points corresponding to the motor image are obtained.
[0024] After each motor image is traversed, a plurality of feature points corresponding to each motor image are obtained.
[0025] In one of the embodiments, the determining the point pair set corresponding to the motor image set according to the plurality of feature points of the adjacent motor images in the motor image set comprises:
[0026] For each motor image in the motor image set except the last motor image, each feature point corresponding to the motor image is matched with each feature point in the next motor image of the motor image, to determine the corresponding feature point of each feature point corresponding to the motor image in the next motor image, and a point pair subset of the motor image and the next motor image is formed; the point pair subset comprises a plurality of point pairs, and each point pair comprises two feature points.
[0027] When the point pair subset of each pair of adjacent motor images in the motor image set is determined, the point pair set of the motor image set is generated according to the point pair subset of each pair of adjacent motor images in the motor image set.
[0028] In one of the embodiments, the calculating the similarity of each point pair in the point pair set respectively comprises:
[0029] For each point pair in the point pair set, a descriptor of the feature point in the point pair is determined.
[0030] According to the descriptor of the feature point in the point pair, a Hamming distance between the feature points in the point pair is calculated, and the similarity between the feature points in the point pair is determined according to the Hamming distance between the feature points in the point pair.
[0031] In one of the embodiments, the probability distribution modeling of the feature point pair set comprises:
[0032] The offset value of each feature point pair in the feature point pair set is calculated.
[0033] According to the offset value of each feature point pair in the feature point pair set, an offset sequence corresponding to the feature point pair set is formed.
[0034] Quantize the offset sequence, and model the quantized offset sequence based on a preset Gaussian function to obtain a discrete Gaussian distribution sequence corresponding to the set of feature point pairs.
[0035] In a second aspect, the present application provides a motor vibration detection device, the device comprising:
[0036] a video acquisition module configured to acquire a to-be-detected video;
[0037] an image segmentation module configured to segment a motor object in each frame of image in the to-be-detected video by using a preset video segmentation model to obtain a motor image set formed by motor images corresponding to each frame of image;
[0038] a feature point extraction module configured to extract feature points from each motor image in the motor image set to obtain a plurality of feature points corresponding to each motor image, and determine a set of point pairs corresponding to the motor image set according to the plurality of feature points of adjacent motor images in the motor image set;
[0039] a similarity calculation module configured to calculate the similarity of each pair of points in the set of point pairs respectively, and select N pairs of points with the highest similarity to form a set of feature point pairs;
[0040] a vibration detection module configured to model the probability distribution of the set of feature point pairs to obtain a discrete Gaussian distribution sequence corresponding to the set of feature point pairs, and then extract vibration features from the discrete Gaussian distribution sequence and map to obtain a vibration frequency and a vibration amplitude.
[0041] In a third aspect, the present application provides a storage medium having computer readable instructions stored therein, wherein the computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of the motor vibration detection method according to any one of the above embodiments.
[0042] In a fourth aspect, the present application provides a computer device comprising one or more processors and a memory.
[0043] The memory has computer readable instructions stored therein, and when the one or more processors execute the computer readable instructions, the steps of the motor vibration detection method according to any one of the above embodiments are performed.
[0044] As can be seen from the above technical solutions, the embodiments of the present application have the following advantages:
[0045] The motor vibration detection method, device, storage medium and computer device provided in the application, the method comprises: segmenting a motor object in each frame of image in a to-be-detected video by using a preset video segmentation model, and a motor image set formed by motor images corresponding to each frame of image can be obtained after segmentation, so that interference caused by objects or backgrounds other than the motor object in the image on vibration detection can be excluded, thereby improving the accuracy of motor vibration detection. Then, after feature points are extracted from each motor image, a point pair set is determined according to a plurality of feature points of adjacent motor images, then the similarity of each pair of points in the point pair set is calculated respectively, and N pairs of points with the highest similarity are selected to perform probability distribution modeling, so that pairs of points with high quality and high matching degree can be screened out, thereby improving the accuracy of the obtained discrete Gaussian distribution sequence, and finally, vibration feature extraction and mapping can be performed on the Gaussian distribution sequence to obtain vibration frequency and vibration amplitude with high accuracy, so as to further improve the accuracy of motor vibration detection. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0047] Figure 1 A flowchart of a motor vibration detection method provided by the embodiment of the present application;
[0048] Figure 2 A flowchart of segmenting a motor object in each frame of image in a to-be-detected video by using a preset video segmentation model provided by the embodiment of the present application;
[0049] Figure 3 A flowchart of performing vibration feature extraction and mapping on a Gaussian distribution sequence to obtain vibration frequency and vibration amplitude provided by the embodiment of the present application;
[0050] Figure 4 A structural diagram of a motor vibration detection device provided by the embodiment of the present application;
[0051] Figure 5 An internal structure diagram of a computer device provided by the embodiment of the present application. DETAILED DESCRIPTION
[0052] With reference to the drawings and the embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0053] In one of the embodiments, the present application provides a motor vibration detection method, and the following embodiments are described by taking the method applied to a server. It can be understood that the motor vibration detection method can be executed by a single server or a server cluster composed of multiple servers, and the present application does not make specific limitation thereto.
[0054] As shown in Figure 1 The present application provides a motor vibration detection method, and the method comprises:
[0055] S101: Obtain a to-be-detected video.
[0056] The to-be-detected video refers to a video obtained by photographing a motor in a working state.
[0057] In this step, when a user needs to detect whether the running state of a motor is abnormal, the user can initiate a motor vibration detection instruction through a client. When the server receives the motor vibration detection instruction, the server will obtain a video of the motor in a working state, i.e., a to-be-detected video, according to the motor vibration detection instruction.
[0058] Specifically, the user can upload the photographed to-be-detected video to the client and then initiate the motor vibration detection instruction. When the server receives the motor vibration detection instruction, the server determines and obtains the to-be-detected video uploaded by the user according to the motor vibration detection instruction. The user can also directly initiate the motor vibration detection instruction. When the server receives the motor vibration detection instruction, the server controls a pre-set photographing device to record the motor to obtain the to-be-detected video. The user can also specify a to-be-detected video of a certain time period and initiate the motor vibration detection instruction. When the server receives the motor vibration detection instruction, the server obtains the to-be-detected video of the time period from the cloud or a local database by obtaining the time period specified by the user. The specific manner of obtaining the to-be-detected video can be determined according to actual conditions, and the present application does not make specific limitation thereto.
[0059] Further, after obtaining the to-be-detected video, it can be checked whether the frame number contained in the to-be-detected video meets the detection requirement. If the frame number contained in the to-be-detected video does not meet the detection requirement, a prompt can be triggered. If the frame number contained in the to-be-detected video meets the detection requirement, a video composed of L frames of images can be segmented from the to-be-detected video, and the video is taken as the final to-be-detected video. Wherein, L is an empirical value, which can be set by considering factors such as the effect of motor vibration detection and the performance of computer equipment. It can be understood that when the frame number contained in the to-be-detected video does not meet the detection requirement, it means that the frame number contained in the to-be-detected video is small, which may lead to a decrease in the accuracy of the motor vibration detection. Therefore, at this time, a system prompt can be triggered to reacquire the to-be-detected video.
[0060] S102: The motor object in each frame of image in the to-be-detected video is segmented by using a preset video segmentation model to obtain a motor image set formed by motor images corresponding to each frame of image.
[0061] The video segmentation model is used to identify and segment the motor object in each frame of image in the to-be-detected video, obtain the motor image corresponding to each frame of image, and output the motor image set formed by the motor images corresponding to each frame of image.
[0062] In this step, the video segmentation model can be used to analyze each frame of image in the to-be-detected video, then identify the motor object in each frame of image, and segment the motor object in each frame of image to obtain the motor image corresponding to each frame of image, and generate the motor image set according to the motor images corresponding to each frame of image.
[0063] In one example, the video segmentation model can adopt a zero-shot video segmentation model. When the zero-shot video segmentation model is used as the video segmentation model in the present application, since the zero-shot video segmentation model does not need to be specifically trained, the calculation resources can be saved, and the deployment is facilitated, thereby improving the efficiency of motor vibration detection.
[0064] S103: Feature points are extracted from each motor image in the motor image set to obtain a plurality of feature points corresponding to each motor image, and a point pair set corresponding to the motor image set is determined according to the plurality of feature points of adjacent motor images in the motor image set.
[0065] The feature point refers to a pixel point with obvious features in the motor image, which can be used to describe the local features of the image, and the feature point includes but is not limited to corner points, edge points, etc.
[0066] In this step, when the motor image set is determined, image processing and feature extraction can be performed on each motor image in the motor image set to determine a plurality of feature points corresponding to each motor image, so as to achieve the purpose of feature point extraction of the motor image. Then, the point pair set corresponding to the motor image set can be determined according to the plurality of feature points corresponding to the motor images adjacent in frame number in the motor image set.
[0067] Specifically, the point pair set includes a plurality of pair points, each pair point is composed of two feature points, and each pair point is derived from the feature points in the adjacent motor images. In one example, a subset in the point pair set can be represented as: {[( ), ( )], [( ), ( )] …, [( ), ( ) ]},wherein, represents the frame number, represents the pair feature point, [( ), ( ) ] represents a pair point, which represents the pair feature point formed by the frame motor image and the frame motor image. It should be noted that the above is described by taking the frame motor image and the frame motor image as an example. In fact, the point pair set includes a plurality of pairs of feature points formed by each pair of adjacent motor images in the motor image set.
[0068] It can be understood that, since the motor images in the motor image set are images of the same motor taken at consecutive times, and then the same method is used to extract feature points from each motor image, therefore, there is a corresponding relationship between the feature points in each motor image. For example, assuming that there are adjacent motor images A, motor image B and motor image C, any feature point in motor image A can find a unique corresponding matching feature point in motor image B, and similarly, any feature point in motor image B can find a unique corresponding matching feature point in motor image C.
[0069] S104: Calculate the similarity of each pair point in the point pair set respectively, and select the N pair points with the highest similarity to form a feature point pair set.
[0070] Wherein, the similarity is used to measure the quality of the pair point matching, that is, to measure the matching degree between the two feature points in the pair point. N is an empirical value, which can be adjusted according to actual demand and data volume, and the present application does not make specific limitation thereto.
[0071] In this step, the matching degree between the two feature points in each pair of points is measured by calculating the similarity of each pair of points in the pair set respectively, and the N pairs of points with the highest similarity are selected, and the pair set is generated according to the selected pairs of points. In this way, the quality of the pair set can be further improved, so that when the data is used to calculate the vibration frequency and vibration amplitude in the subsequent, due to the high accuracy of the data used, the accuracy of the vibration detection can be improved.
[0072] S105: The probability distribution of the feature point pair set is modeled to obtain the discrete Gaussian distribution sequence corresponding to the feature point pair set, and then the vibration features are extracted and mapped to obtain the vibration frequency and vibration amplitude.
[0073] In this step, when the feature point pair set is determined, the offset sequence of the feature point pair set is determined, and then the probability distribution of the offset sequence is modeled to obtain the discrete Gaussian distribution sequence corresponding to the feature point pair set. Finally, the vibration features are extracted from the discrete Gaussian distribution sequence, and the extracted vibration features are mapped to the frequency and amplitude space to obtain the vibration frequency and vibration amplitude of the corresponding motor in the to-be-detected video. The offset sequence refers to a sequence composed of the offset values of each pair of points in the feature point pair set.
[0074] It can be understood that the vibration frequency and vibration amplitude are determined by extracting the vibration features and then mapping the vibration features to the frequency and amplitude control. In this way, effective information can be extracted as much as possible, and noise interference to the calculation of the final vibration frequency and vibration amplitude can be avoided, so as to improve the robustness and detection accuracy of the vibration detection.
[0075] The motor vibration detection method, device, storage medium and computer equipment provided in the application, the method comprises: using a preset video segmentation model to segment the motor object in each frame of image in the to-be-detected video. Through segmentation, a motor image set formed by motor images corresponding to each frame of image can be obtained. In this way, the interference caused by objects other than the motor object or the background in the image to the vibration detection can be excluded, thereby improving the accuracy of the motor vibration detection. Then, after feature points are extracted from each motor image, a pair set is determined according to the multiple feature points of adjacent motor images, and then the similarity of each pair of points in the pair set is calculated, and the N pairs of points with the highest similarity are selected for probability distribution modeling. In this way, the pairs of points with high quality and high matching degree can be screened out, and the accuracy of the obtained discrete Gaussian distribution sequence can be improved. Finally, the vibration features can be extracted and mapped from the Gaussian distribution sequence to obtain the vibration frequency and vibration amplitude with high accuracy, so as to further improve the accuracy of the motor vibration detection.
[0076] As Figure 2As shown, in one of the embodiments, a preset video segmentation model is used to segment the motor object in each frame image in the to-be-detected video, to obtain a motor image set formed by motor images corresponding to each frame image, including:
[0077] S201: Determine a preset video segmentation model.
[0078] In one example, the video segmentation model in the present embodiment can adopt a SAM2 (Segment Anything in Images and Videos, zero-shot video segmentation) model, which is a high-precision zero-shot video segmentation model. When the SAM2 model is used as the video segmentation model in the present embodiment, the identification and segmentation tasks can be realized without the need for segmentation task learning for specific motor samples, thereby saving computing resources and improving the efficiency and performance of motor vibration detection.
[0079] S202: Divide the to-be-detected video into picture frames according to the sampling frame rate of the to-be-detected video, to obtain each frame image in the to-be-detected video.
[0080] In this step, the sampling frame rate of the shooting device is obtained, and then the to-be-detected video is divided into picture frames according to the sampling frame rate, to obtain each frame image in the to-be-detected video.
[0081] S203: Obtain a segmentation prompt point, and input the segmentation prompt point and each frame image into the video segmentation model, to segment the motor object in each frame image according to the segmentation prompt point, to obtain a motor image corresponding to each frame image.
[0082] The segmentation prompt point refers to a prompt for prompting the model to identify and segment the motor object.
[0083] In this step, the segmentation prompt point is used as the model prompt, and each frame image in the to-be-detected video is used as the model input. The segmentation prompt point and each frame image are input into the video segmentation model, so that the video segmentation model can identify and segment the motor object in each frame image according to the segmentation prompt point, to obtain a motor image corresponding to each frame image, which only retains the motor object.
[0084] In one example, when the SAM2 model is used as the video segmentation model, the SAM2 model can be loaded and a predictor build_sam2_video_predictor can be constructed. Then, the segmentation prompt point is obtained, and the segmentation prompt point and each frame image are input into the SAM2 model for inference. The segmentation prompt point is propagated in the SAM2 model to obtain a mask, and finally the motor segmentation mask image of each frame image is obtained, to further determine the motor image of each frame image.
[0085] S204: Generate a set of motor images based on each motor image.
[0086] Understandably, a video segmentation model is used to identify and segment the motor object in each frame of the video to be detected. After segmentation, a set of motor images formed by the motor images corresponding to each frame can be obtained. This can eliminate the interference caused by other objects or backgrounds in the image besides the motor object to the vibration detection, thereby improving the accuracy of motor vibration detection.
[0087] like Figure 3 As shown, in one embodiment, vibration feature extraction and mapping of the Gaussian distribution sequence to obtain vibration frequency and vibration amplitude includes:
[0088] S301: Determine the preset vibration detection model.
[0089] The vibration detection model includes a multilayer convolutional network (MCN) and a multilayer perceptron module. Specifically, the MCN is a deep learning model, and the multilayer perceptron module comprises two multilayer perceptrons. A multilayer perceptron is a feedforward artificial neural network model. It consists of multiple layers, including an input layer, hidden layers, and an output layer. Each layer contains multiple neurons connected by weights.
[0090] Specifically, the vibration detection model of this application can use the discrete Gaussian distribution sequence obtained during motor vibration detection as training samples, and the vibration frequency and amplitude of the motor as sample labels. The model is then trained using a loss function on a pre-trained model. During training, the server can input the training samples and their corresponding sample labels into the pre-trained model for forward propagation, and use the loss function to adjust the parameters of the pre-trained model during backpropagation until the pre-trained model meets certain iteration conditions. The completed pre-trained model can then be used as the vibration detection model. It is understood that the iteration conditions can be reaching a certain number of iterations or the parameter change being less than a preset threshold; this application does not impose specific limitations on these conditions. Furthermore, during the training of the vibration detection model, sample labels can be collected by sensors fixed to the motor.
[0091] S302: Use a multi-layer convolutional network to extract features from a discrete Gaussian distribution sequence to obtain a feature matrix, and then straighten the feature matrix to obtain vibration features.
[0092] In one example, the process of using a multi-layer convolutional network to extract features from a discrete Gaussian distributed sequence can be represented as:
[0093]
[0094] In the formula, Represents the first digit in a discrete Gaussian distribution sequence. One element, The first element in the output eigenmatrix represents the eigenvalue of the eigenvalue matrix. One element, The convolution kernel is represented by the first... Each weight, Let be the length of the discrete Gaussian distribution sequence. This indicates the size of the convolution kernel.
[0095] Assuming that after passing through multiple convolutional networks, we can obtain features with a shape of (4, 32), which is the feature matrix in this embodiment, where 4 is the feature length and 32 is the feature dimension, then we can straighten it into a 4×32=128-dimensional feature, which is the vibration feature in this embodiment.
[0096] S303: Input the vibration characteristics into the sensor module for feature mapping to obtain the vibration frequency and vibration amplitude.
[0097] The vibration features are mapped to the frequency space and amplitude space by the multilayer perceptron module to obtain the vibration frequency and vibration amplitude. Taking the above example as an illustration, the 128-dimensional features are mapped to the frequency space and amplitude space to obtain two one-dimensional outputs (vibration frequency and vibration amplitude).
[0098] It is understandable that vibration features are extracted by using a multi-layer convolutional network, and then the vibration features are mapped by a multi-layer perceptron module to obtain the vibration frequency and vibration amplitude. This can extract as much effective information as possible and avoid noise interference in the final calculation of vibration frequency and vibration amplitude, thereby improving the robustness and accuracy of vibration detection.
[0099] In one embodiment, feature points are extracted from each motor image in the motor image set to obtain multiple feature points corresponding to each motor image, including:
[0100] S1: Determine the threshold parameters for each region in the motor image based on the image parameters of each motor image in the motor image set.
[0101] In this step, motor images from the motor image set are analyzed to determine the overall image parameters of the motor images, such as brightness and texture. Then, based on the overall characteristics of the motor images, threshold parameters for each region within the motor images are determined.
[0102] Furthermore, threshold parameters for each region of the motor image can be determined using a pre-trained neural network model, or a mapping relationship between the overall features of the motor and threshold parameters can be established, and then this mapping relationship can be queried to determine the threshold parameters for each region of the motor image. This application does not impose specific limitations in this regard.
[0103] S2: Preprocess each motor image to highlight the main features of each motor image.
[0104] In this step, at least one processing including gray-scale processing, normalization, filtering can be performed on each motor image to eliminate noise and non-main features in each motor image, thereby highlighting the main features of each motor image.
[0105] S3: For each preprocessed motor image, traverse each pixel point of the motor image, if the absolute value of the difference between the gray value of the pixel point and the gray value of the surrounding pixel point is less than the threshold parameter of the region where the pixel point is located, and the surrounding pixel point is greater than a preset threshold, the pixel point is determined as a feature point, and after traversing the motor image, a plurality of feature points corresponding to the motor image are obtained.
[0106] In this embodiment, the surrounding pixel point refers to a plurality of pixel points around the pixel point, in other words, the surrounding pixel point can refer to all pixel points around the pixel point, or a part of the pixel points around the pixel point, and the specific surrounding pixel point determination rule can be determined according to performance requirements and other aspects, which is not limited in the present application. It should be noted that the surrounding pixel point here can refer to adjacent similar points, or pixel points on the edge of a geometric figure determined with the pixel point as the center.
[0107] For example, when the pixel point being traversed is point A, assuming that the preset threshold is 2, the determined surrounding pixel points of the pixel point are point B, point C and point D, at this time, the absolute value of the difference between the gray value of point A and point B is calculated as AB, the absolute value of the difference between the gray value of point A and point C is calculated as AC, and the absolute value of the difference between the gray value of point A and point D is calculated as AD, if the absolute values AB, AC and AD are all less than the threshold parameter of the region where point A is located, then point A can be determined as a feature point, otherwise, point A cannot be determined as a feature point.
[0108] S4: After traversing each motor image, a plurality of feature points corresponding to each motor image are obtained.
[0109] It can be understood that the threshold parameters of different regions are determined according to the image parameters of the motor image as a whole, and then the threshold parameters of different regions are compared when determining the feature points, so that the motor images obtained from the to-be-detected video shot in different environments can be adapted, and the robustness of motor vibration detection is further improved.
[0110] In one embodiment, the set of point pairs corresponding to the set of motor images is determined according to a plurality of feature points of adjacent motor images in the set of motor images, comprising:
[0111] S1: For each motor image in the motor image set except the last motor image, match each feature point corresponding to the motor image with each feature point in the next motor image of the motor image, to determine the feature point corresponding to each feature point of the motor image in the next motor image, and form a point pair subset of the motor image and the next motor image.
[0112] wherein the point pair subset includes a plurality of pair points, and each pair point includes two feature points. In one example, the point pair subset can be represented as {[( ), ( )], [( ), ( )] …, [( ), ( ) ]} wherein, represents the frame number, represents the pair feature point, [( ), ( ) ] represents a pair point, i.e. represents the pair feature point formed by the frame motor image and the frame motor image.
[0113] In this step, for each motor image, a feature point matching method can be used to match each feature point corresponding to the motor image with each feature point in the next motor image of the motor image, and then after determining the feature point corresponding to each feature point of the motor image in the next motor image, a point pair subset of the motor image and the next motor image can be generated according to the feature point corresponding to each feature point of the motor image in the next motor image. Specifically, the feature point matching method can use the FLANN (Fast Library for Approximate Nearest Neighbors, nearest neighbor matching) method, or other applicable feature point matching methods, which are not specifically limited in the present application.
[0114] S2: When the point pair subset of each pair of adjacent motor images in the motor image set is determined, generate the point pair set of the motor image set according to the point pair subset of each pair of adjacent motor images in the motor image set.
[0115] It can be understood that in the present embodiment, the offset of the motor vibration can be analyzed by matching the feature points of adjacent motor images, and then the vibration frequency and the vibration amplitude of the motor vibration can be determined.
[0116] In one of the embodiments, the similarity of each pair point in the point pair set is calculated respectively, including:
[0117] S1: determining the descriptors of the feature points in each pair of points in the set of pairs of points.
[0118] S2: calculating the Hamming distance between the feature points in the pair of points according to the descriptors of the feature points in the pair of points, and determining the similarity between the feature points in the pair of points according to the Hamming distance between the feature points in the pair of points.
[0119] The descriptor is a vector used to describe the local region information around the feature point. The descriptor can be generated when the feature point is determined. The Hamming distance refers to the number of different characters in the corresponding positions of two equal-length strings.
[0120] In this embodiment, when the descriptors of the feature points in the pair of points are determined, the Hamming distance between the descriptors of the feature points in the pair of points is calculated, and the calculated Hamming distance is determined as the Hamming distance between the feature points in the pair of points. Then, the similarity between the feature points in the pair of points is determined based on the Hamming distance between the feature points in the pair of points.
[0121] In one example, when the similarity between the feature points in the pair of points is determined based on the Hamming distance between the feature points in the pair of points, the similarity between the feature points in the pair of points can be determined by querying a preset function model.
[0122] It can be understood that the smaller the Hamming distance between the descriptors of two feature points is, the more similar the descriptors of the two feature points are. At this time, it is indicated that the matching degree between the feature points is high. By calculating the similarity between the feature points in each pair of points, the matching quality of each pair of points can be determined, and then the matching quality can be screened to improve the accuracy of the data of the calculated vibration frequency and vibration amplitude, thereby improving the precision of the vibration detection of the motor.
[0123] In one embodiment, the set of pairs of feature points is modeled to obtain a discrete Gaussian distribution sequence corresponding to the set of pairs of feature points, including:
[0124] S1: calculating the offset value of each feature pair point in the set of pairs of feature points.
[0125] In one example, the process of calculating the offset value of each feature pair point in the set of pairs of feature points can be represented as follows:
[0126]
[0127] In the formula, denotes the offset value of the i-th feature pair point in the j-th frame motor image, denotes the offset value of the i-th feature pair point in the j-th frame motor image, denotes the offset value of the i-th feature pair point in the j-th frame motor image, The coordinates of the feature points in the feature pair. Indicates the number of frames. Indicates the first For feature pairs.
[0128] S2: Based on the offset value of each feature pair in the feature point pair set, form the offset sequence corresponding to the feature point pair set.
[0129] In one example, the offset sequence can be represented as: {( ), ( ),…, ( ), …, ( The data shape is (L-1, N, 1), where L represents the number of motor images in the motor image set, and N represents the number of feature points in the motor image. ) can represent the first The set of offsets in a frame motor image.
[0130] S3: Quantize the offset sequence and model the discrete Gaussian distribution of the quantized offset sequence based on the preset Gaussian function to obtain the discrete Gaussian distribution sequence corresponding to the feature point pair set.
[0131] In this step, the offset sequence is quantized according to the preset quantization grid size, and then the quantized offset sequence is modeled as a discrete Gaussian distribution based on the preset Gaussian function to obtain the Gaussian distribution sequence corresponding to the feature point pair set.
[0132] In one example, the Gaussian function can be represented as:
[0133]
[0134] In the formula, For the offset sequence number Gaussian function values of each element Represents standard deviation, This represents the mean.
[0135] Will Normalization is performed so that the sum of all calculated Gaussian function values is 1. The normalization formula can be expressed as:
[0136]
[0137] In the formula, and Both represent element indices. The normalized offset sequence is the first... Gaussian function value of an element. When the normalized Gaussian function value of each element is determined, the discrete Gaussian distribution sequence can be determined based thereon, at which time the discrete Gaussian distribution sequence obtained is data in the shape of (L-1, N, 256), then the data in the second dimension and the third dimension of the discrete Gaussian distribution sequence is straightened, data in the shape of (L-1, N*256) is obtained, and the straightened discrete Gaussian distribution sequence is taken as the final discrete Gaussian distribution sequence, and finally the discrete Gaussian distribution sequence is determined as the discrete Gaussian distribution sequence corresponding to the feature point pair set.
[0138] It can be understood that the one-dimensional distribution in the offset sequence is modeled into a discrete Gaussian distribution through discrete Gaussian distribution modeling, so as to be input into the vibration detection model for feature extraction and mapping, and then high-precision motor vibration detection is realized.
[0139] It should be understood that although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.
[0140] The motor vibration detection device provided by the embodiments of the present application is described below. The motor vibration detection device described below can be correspondingly referred to the motor vibration detection method described above.
[0141] As shown in Figure 4 The present application provides a motor vibration detection device 400, which comprises:
[0142] The video acquisition module 401 is configured to acquire a to-be-detected video.
[0143] The image segmentation module 402 is configured to segment the motor object in each frame of image in the to-be-detected video by using a preset video segmentation model, to obtain a motor image set formed by motor images corresponding to each frame of image.
[0144] The feature point extraction module 403 is configured to extract feature points from each motor image in the motor image set, to obtain a plurality of feature points corresponding to each motor image, and to determine a point pair set corresponding to the motor image set according to the plurality of feature points of adjacent motor images in the motor image set.
[0145] The similarity calculation module 404 is configured to calculate the similarity of each pair of points in the pair set of points respectively, and select N pairs of points with the highest similarity to form a pair set of feature points.
[0146] The vibration detection module 405 is configured to model the probability distribution of the pair set of feature points, obtain a discrete Gaussian distribution sequence corresponding to the pair set of feature points, and perform vibration feature extraction and mapping on the Gaussian distribution sequence to obtain the vibration frequency and the vibration amplitude.
[0147] In one of the embodiments, the image segmentation module comprises:
[0148] The first model determination sub-module is configured to determine a preset video segmentation model.
[0149] The frame rate segmentation sub-module is configured to segment the to-be-detected video into picture frames according to the acquisition frame rate of the to-be-detected video to obtain each frame image in the to-be-detected video.
[0150] The image segmentation sub-module is configured to obtain segmentation prompt points, and input the segmentation prompt points and the frame images into the video segmentation model to segment the motor object in each frame image according to the segmentation prompt points to obtain the motor image corresponding to each frame image.
[0151] The set generation sub-module is configured to generate a motor image set based on each motor image.
[0152] In one of the embodiments, the vibration detection module comprises:
[0153] The second model determination sub-module is configured to determine a preset vibration detection model; the vibration detection model comprises a multi-layer convolutional network and a multi-layer perceptron module.
[0154] The feature extraction sub-module is configured to perform feature extraction on the Gaussian distribution sequence by using the multi-layer convolutional network to obtain a feature matrix, and straighten the feature matrix to obtain the vibration feature.
[0155] The feature mapping sub-module is configured to input the vibration feature into the perceptron module for feature mapping to obtain the vibration frequency and the vibration amplitude.
[0156] In one of the embodiments, the feature point extraction module comprises:
[0157] The parameter determination sub-module is configured to determine the threshold parameter of each region in the motor image according to the image parameter of each motor image in the motor image set.
[0158] The preprocessing sub-module is configured to pre-process each motor image to highlight the main features of each motor image.
[0159] The traversal submodule is configured to traverse each pixel point of each preprocessed motor image, and determine the pixel point as a feature point if the absolute value of the difference between the gray value of the pixel point and the gray value of the surrounding pixel point of the pixel point is less than the threshold parameter of the surrounding pixel point of the region where the pixel point is located and the surrounding pixel point is greater than a preset threshold, and obtain a plurality of feature points corresponding to the motor image after traversing the motor image.
[0160] The feature point determination submodule is configured to obtain a plurality of feature points corresponding to each motor image after traversing each motor image.
[0161] In one embodiment, the feature point extraction module includes:
[0162] The feature point matching submodule is configured to match each feature point corresponding to each motor image in the motor image set except the last motor image with each feature point in the next motor image of the motor image, to determine the corresponding feature point of each feature point corresponding to the motor image in the next motor image, and form a point pair subset of the motor image and the next motor image; the point pair subset includes a plurality of pair points, and each pair point includes two feature points.
[0163] The point pair set determination submodule is configured to generate a point pair set of the motor image set according to the point pair subset of each pair of adjacent motor images in the motor image set after determining the point pair subset of each pair of adjacent motor images in the motor image set.
[0164] In one embodiment, the similarity calculation module includes:
[0165] The descriptor determination submodule is configured to determine the descriptor of the feature point in each pair point in the point pair set.
[0166] The similarity determination submodule is configured to calculate the Hamming distance between the feature points in the pair point according to the descriptor of the feature points in the pair point, and determine the similarity between the feature points in the pair point according to the Hamming distance between the feature points in the pair point.
[0167] In one embodiment, the vibration detection module includes:
[0168] The offset value calculation submodule is configured to calculate the offset value of each feature pair point in the feature point pair set.
[0169] The sequence determination submodule is configured to form an offset sequence corresponding to the feature point pair set according to the offset value of each feature pair point in the feature point pair set.
[0170] The sequence modeling submodule is configured to quantize the offset sequence, and model the quantized offset sequence based on a preset Gaussian function to obtain a discrete Gaussian distribution sequence corresponding to the feature point pair set.
[0171] The division of each module in the motor vibration detection apparatus is merely used for illustration, and in other embodiments, the motor vibration detection apparatus can be divided into different modules as needed to complete all or part of the functions of the motor vibration detection apparatus. Each module in the motor vibration detection apparatus can be implemented wholly or partially by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in the computer device in hardware form, or can be stored in a memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.
[0172] In one embodiment, the present application further provides a storage medium having computer readable instructions stored therein, and the computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of the motor vibration detection method according to any one of the above embodiments.
[0173] In one embodiment, the present application further provides a computer device having computer readable instructions stored therein, and the computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of the motor vibration detection method according to any one of the above embodiments.
[0174] As shown in Figure 5 , Figure 5 Fig. 6 is a schematic diagram of an internal structure of a computer device according to an embodiment of the present application. The computer device 500 can be provided as a server. As shown in Figure 5 , the computer device 500 includes a processing assembly 502, which further includes one or more processors, and a memory resource represented by a memory 501, for storing instructions executable by the processing assembly 502, such as an application program. The application program stored in the memory 501 can include one or more than one module each corresponding to a set of instructions. In addition, the processing assembly 502 is configured to execute the instructions to perform the motor vibration detection method according to any one of the above embodiments.
[0175] The computer device 500 can further include a power supply component 503 configured to perform power management of the computer device 500, a wired or wireless network interface 504 configured to connect the computer device 500 to a network, and an input / output (I / O) interface 505. The computer device 500 can operate based on an operating system stored in the memory 501, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM, or the like.
[0176] Those skilled in the art can understand that Figure 5 The structure shown in FIG. 5 is merely a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. A specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0177] Finally, it should be noted that, in the present document, the terms such as first and second are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between the entities or operations. Also, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the element defined by the phrase "including a" does not exclude the presence of additional identical elements in the process, method, article or device including the element. In the present document, the singular forms "a", "an" and "the" can also include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "include / contain" or "have" and the like specify the presence of stated features, integers, steps, operations, components, parts or combinations thereof, but do not exclude the presence or addition of one or more other features, integers, steps, operations, components, parts or combinations thereof, and the term "and / or" used in the present specification includes any and all combinations of the related listed items.
[0178] The various embodiments in the present specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same and similar parts refer to each other.
[0179] The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Modifications of these embodiments will occur to persons of skill in the art, and that the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Therefore, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method of detecting vibrations of an electric machine, characterized in that, The method comprises: acquiring a video to be detected; segmenting motor objects in each frame of image in the video to be detected by using a preset video segmentation model to obtain a motor image set formed by motor images corresponding to each frame of image; extracting feature points of each motor image in the motor image set to obtain a plurality of feature points corresponding to each motor image, and determining a point pair set corresponding to the motor image set according to the plurality of feature points of adjacent motor images in the motor image set; calculating the similarity of each point pair in the point pair set respectively, and selecting N point pairs with the highest similarity to form a feature point pair set; modeling the probability distribution of the feature point pair set to obtain a discrete Gaussian distribution sequence corresponding to the feature point pair set, and then extracting and mapping vibration frequency and vibration amplitude from the vibration characteristics of the discrete Gaussian distribution sequence; the determination of the point pair set corresponding to the motor image set according to the plurality of feature points of adjacent motor images in the motor image set comprises: for each motor image in the motor image set except the last frame of motor image, matching each feature point of the motor image with each feature point in the next motor image of the motor image to determine the corresponding feature point of each feature point of the motor image in the next motor image, and then forming a point pair subset of the motor image and the next motor image; the point pair subset comprises a plurality of point pairs, and each point pair comprises two feature points; after determining the point pair subset of each pair of adjacent motor images in the motor image set, generating the point pair set of the motor image set according to the point pair subset of each pair of adjacent motor images in the motor image set; the calculation of the similarity of each point pair in the point pair set comprises: for each point pair in the point pair set, determining the descriptor of the feature point in the point pair; calculating the Hamming distance between the feature points in the point pair according to the descriptor of the feature points in the point pair, and determining the similarity between the feature points in the point pair according to the Hamming distance between the feature points in the point pair; the modeling of the probability distribution of the feature point pair set to obtain the discrete Gaussian distribution sequence corresponding to the feature point pair set comprises: calculating the offset value of each feature point pair in the feature point pair set; forming an offset sequence corresponding to the feature point pair set according to the offset value of each feature point pair in the feature point pair set; quantizing the offset sequence, and modeling the discrete Gaussian distribution of the quantized offset sequence based on a preset Gaussian function to obtain the discrete Gaussian distribution sequence corresponding to the feature point pair set.
2. The motor vibration detection method of claim 1, wherein the segmentation of motor objects in each frame of image in the video to be detected by using a preset video segmentation model to obtain a motor image set formed by motor images corresponding to each frame of image comprises: determining a preset video segmentation model; dividing the video to be detected into picture frames according to the acquisition frame rate of the video to be detected to obtain each frame of image in the video to be detected; The segmentation prompt points are acquired, and the segmentation prompt points and the frames of images are input into the video segmentation model to segment motor objects in the frames of images according to the segmentation prompt points, so that motor images corresponding to the frames of images are obtained; A motor image set is generated based on the motor images.
3. The motor vibration detection method of claim 1, wherein The vibration feature extraction and mapping of the Gaussian distribution sequence to obtain the vibration frequency and the vibration amplitude, comprising: A preset vibration detection model is determined; the vibration detection model comprises a multi-layer convolutional network and a multi-layer perceptron module; The multi-layer convolutional network is used for feature extraction of the Gaussian distribution sequence to obtain a feature matrix, and the feature matrix is straightened to obtain a vibration feature; The vibration feature is input into the perceptron module for feature mapping to obtain the vibration frequency and the vibration amplitude.
4. The motor vibration detection method of claim 1, wherein The feature point extraction of each motor image in the motor image set is performed to obtain a plurality of feature points corresponding to each motor image, comprising: Threshold parameters of each region in the motor image are determined according to image parameters of each motor image in the motor image set; Each motor image is preprocessed to highlight the main features of each motor image; For each preprocessed motor image, each pixel point of the motor image is traversed, and if the absolute value of the difference between the gray value of the pixel point and the gray value of the surrounding pixel points of the pixel point is less than the threshold parameter of the region where the pixel point is located, and the surrounding pixel points of the threshold parameter are greater than a preset threshold, the pixel point is determined as a feature point, and after the traversal of the motor image, a plurality of feature points corresponding to the motor image are obtained. After the traversal of each motor image, a plurality of feature points corresponding to each motor image are obtained.
5. An electric machine vibration detection apparatus, characterized by comprising: The device comprises: A video acquisition module is configured to acquire a to-be-detected video; An image segmentation module is configured to segment motor objects in each frame of image in the to-be-detected video by using a preset video segmentation model to obtain a motor image set formed by motor images corresponding to the frames of images; A feature point extraction module is configured to extract feature points from each motor image in the motor image set to obtain a plurality of feature points corresponding to each motor image, and determine a point pair set corresponding to the motor image set according to the plurality of feature points of adjacent motor images in the motor image set; A similarity calculation module is configured to calculate the similarity of each pair of points in the point pair set respectively, and select N pairs of points with the highest similarity to form a feature point pair set; A vibration detection module is configured to model a probability distribution of the feature point pair set to obtain a discrete Gaussian distribution sequence corresponding to the feature point pair set, and then extract vibration features from the discrete Gaussian distribution sequence and map the vibration features to obtain a vibration frequency and a vibration amplitude. The feature point extraction module comprises: For each motor image in the motor image set except the last frame of motor image, each feature point corresponding to the motor image is matched with each feature point in the next motor image of the motor image to determine the feature point corresponding to each feature point of the motor image in the next motor image, and then a point pair subset of the motor image and the next motor image is formed; the point pair subset comprises a plurality of pairs of points, and each pair of points comprises two feature points. generating a point pair set of the motor image set according to the point pair subsets of each pair of adjacent motor images in the motor image set; the similarity calculation module comprises: for each point pair in the point pair set, determining the descriptor of the feature point in the point pair; calculating the Hamming distance between the feature points in the point pair according to the descriptor of the feature points in the point pair, and determining the similarity between the feature points in the point pair according to the Hamming distance between the feature points in the point pair; the vibration detection module comprises: calculating the offset value of each feature point pair in the feature point pair set; forming the offset sequence corresponding to the feature point pair set according to the offset value of each feature point pair in the feature point pair set; quantizing the offset sequence, and modeling the quantized offset sequence based on a preset Gaussian function to obtain a discrete Gaussian distribution sequence corresponding to the feature point pair set.
6. A storage medium characterized by: The storage medium stores computer readable instructions, and the computer readable instructions are executed by one or more processors to cause the one or more processors to perform the steps of the motor vibration detection method according to any one of claims 1 to 4.
7. A computer device, comprising: comprise: one or more processors, and a memory; The storage medium stores computer readable instructions, and the computer readable instructions are executed by the one or more processors to perform the steps of the motor vibration detection method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Image classification based method and device for automatically segmenting videos
CN102609723A
Image screening method and device, equipment and storage medium
CN115909415A