RGB-D-based bolt looseness detection method and device
By combining the deep learning network with RGB-D information, it solves the problems of low accuracy and poor universality of bolt loosening detection in dirty environments in the existing technology, achieves efficient bolt segmentation and loosening judgment, and reduces the need for manual experience. rely.
Patent Information
- Application Number
- CN202410856915.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-17
AI Technical Summary
When existing technology detects whether bolts are loose, especially in dirty environments, the semantic segmentation accuracy based on RGB images is low and cannot adapt to dirty environments, and the point cloud-based method is universally applicable to small bolts and bolts with low looseness. It has poor performance and relies on manual experience to set the loosening distance threshold.
The bolt loosening detection method based on RGB-D is used, combined with two-dimensional image information and depth features, and judged through a deep learning network to reduce reliance on manual experience, improve image segmentation accuracy and detection efficiency, and improve universality and performance. Specific steps include collecting the RGB-D information of the bolt, performing image registration, cropping, segmentation network processing and twin classification network judgment.
It improves the bolt segmentation accuracy and detection efficiency, can effectively adapt to dirty environments, reduces the dependence on manual experience, and improves the universality and performance of bolt detection.
Smart Images

Figure CN118658003A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of target detection and relates to a method and device for detecting bolt loosening based on RGB-D. Background Art
[0002] Detecting whether bolts are loose is a common task in the industrial world. Due to the dusty and dirty environment, bolts and nuts are small targets and have similar colors and textures to the fastening parts. Manual detection methods have problems such as high labor costs, harsh working environments, and high professional skills requirements for employees. At present, computer vision detection technology based on image semantic segmentation is also increasingly being applied to the field of bolt detection.
[0003] The traditional semantic segmentation based on RGB images has low accuracy, is difficult to adapt to dirty environments, and cannot completely and accurately extract the bolt area. Currently, the common methods for judging bolt looseness are mostly based on RGB visible light or point cloud. The RGB-based method mostly extracts bolt corner or edge information, which is not applicable to dirty bolts or bolts that are loose by one circle. The point cloud-based method mostly judges the distance characteristics between the bolt surface and the surface of the fastened device. This method is limited by the accuracy of the point cloud data collected by the sensor. It is not universal for small bolts or bolts with a low degree of looseness. In addition, the loose distance threshold needs to be set manually for different bolts, which relies on manual experience. Summary of the invention
[0004] Technical purpose: In response to the above technical problems, the present invention proposes a bolt loosening detection method based on RGB-D, which combines two-dimensional image information and depth features, and makes judgments through a deep learning network, thereby reducing dependence on manual experience, improving image segmentation accuracy and bolt detection efficiency, and enhancing universality and performance for various scenarios.
[0005] Technical solution: To achieve the above technical objectives, the present invention adopts the following technical solution:
[0006] A bolt loosening detection method based on RGB-D, comprising the steps of:
[0007] S1. Collect a defect-free two-dimensional image and a depth map of the bolt to be inspected in the initial tightening state as a standard map; collect a two-dimensional image and a depth map of the bolt to be inspected in the real-time state as a test map;
[0008] S2. For the two-dimensional image in the standard image, use the calibration tool box to select the bolt to be detected and record the information of the target box;
[0009] S3, registering the two-dimensional image in the standard image with the two-dimensional image in the test image to obtain a feature transformation matrix;
[0010] S4, mapping the target frame onto the test image using the feature transformation matrix to obtain a test image marked with a mapping frame;
[0011] S5, performing a first cropping of the standard image based on the target frame, cropping out a two-dimensional image and a depth map of the area where the target frame is located; performing a first cropping of the test image based on the mapping frame, cropping out a two-dimensional image and a depth map of the area where the mapping frame is located;
[0012] S6, constructing a bolt segmentation network, wherein the bolt segmentation network inputs a two-dimensional image and a depth map obtained by first cropping the standard image, and a two-dimensional image and a depth map obtained by first cropping the test image, and outputs a segmentation mask map of the standard image and a segmentation mask map of the test image;
[0013] S7, based on the minimum circumscribed square of the segmentation mask of the standard image obtained in step S6, the standard image is cropped for the second time, that is, the segmentation mask image corresponding to the standard image, the two-dimensional image and the depth map obtained by the first cropping of the standard image are cropped respectively to obtain the corresponding two-dimensional image, depth map and segmentation mask;
[0014] Based on the minimum circumscribed square of the segmentation mask of the test image obtained in step S6, the test image is cropped for the second time, that is, the segmentation mask image corresponding to the test image, the two-dimensional image and the depth map obtained by the first cropping of the test image are cropped respectively to obtain the corresponding two-dimensional image, depth map and segmentation mask;
[0015] S8. Construct a bolt twin classification network, which inputs the two-dimensional image, depth map and segmentation mask obtained by the second cropping of the standard image, and the two-dimensional image, depth map and segmentation mask obtained by the second cropping of the test image, and outputs a judgment result of whether the bolt is loose.
[0016] Preferably, in step S1, the two-dimensional image and the depth map corresponding to the standard image or the test image are collected in the following manner:
[0017] Use an RGBD camera to collect the RGB image of the bolt to be inspected as a 2D image of the standard image or test image;
[0018] Use an RGBD camera to continuously collect 5 frames of depth maps to form a 5*W*H depth map matrix, where W and H are the width and height of the depth map respectively; use the 5*5*5 median to perform median filtering on the depth map matrix, and use the filtered image as the depth map of the standard image or test image.
[0019] Preferably, in step S3, the two-dimensional image in the standard image and the two-dimensional image in the test image are registered using a superpoint+superglue model to obtain a feature transformation matrix.
[0020] Preferably, in step S6, the bolt segmentation network includes two independent branch networks, which are respectively used to input the two-dimensional image and the depth map obtained by the first cropping of the standard image, and the two-dimensional image and the depth map obtained by the first cropping of the test image;
[0021] The structures of the two branch networks are the same, including:
[0022] The first two-dimensional image preprocessing module is used to input a two-dimensional image and perform mean subtraction and variance division processing;
[0023] A depth map normalization module 1, used to input a depth map and perform normalization processing on the depth value;
[0024] Subnetwork 1, with two components, one for receiving the preprocessed 2D image and the other for receiving the normalized depth map, extracting feature vectors and outputting feature maps of the same dimension;
[0025] The superposition module 1 is used to perform superposition processing on the feature maps output by the two sub-networks 1;
[0026] The backbone network uses the HRnet network to input the feature map output by the superposition module 1 and extract the segmentation mask map;
[0027] The output module is used to output the segmentation mask map extracted by the backbone network.
[0028] Preferably, in step S8, the bolt twin classification network includes net1, net2, a stacking module and a classification module, which are respectively used to input the two-dimensional image, depth map and segmentation mask obtained by the second cropping of the standard image, and the two-dimensional image, depth map and segmentation mask obtained by the second cropping of the test image; the outputs of net1 and net2 are commonly connected to the stacking module, the stacking module is used to stack the weight sharing of net1 and net2, the outputs of net1 and net2 are commonly connected to the feature vector output by the stacking module, and the classification module determines whether the bolt is loose according to the stacked feature vector;
[0029] The structures of net1 and net2 are the same, both of which include:
[0030] The second two-dimensional image preprocessing module is used to input a two-dimensional image and perform mean subtraction and variance division processing;
[0031] The depth map normalization module 2 is used to input the depth map and normalize the depth value;
[0032] Subnetwork 2, with two components, one for receiving the preprocessed 2D image and segmentation mask, and the other for receiving the normalized depth map and segmentation mask, extracting feature vectors and outputting feature maps of the same dimension;
[0033] The superposition module 2 is used to perform superposition processing on the feature maps output by the two sub-networks 2;
[0034] The backbone network uses the Resnet18 network to input the feature map output by the superposition module 2 and the segmentation mask module to extract the feature vector.
[0035] A bolt loosening detection device based on RGB-D, characterized in that the device comprises:
[0036] An image acquisition module is used to acquire a defect-free two-dimensional image and a depth map of the bolt to be inspected in an initial tightening state as a standard image; and to acquire a two-dimensional image and a depth map of the bolt to be inspected in a real-time state as a test image;
[0037] A standard image calibration module is used to select the bolt to be detected using a calibration tool box for the two-dimensional image in the standard image, and record the information of the target box;
[0038] A registration module is used to register the two-dimensional image in the standard image with the two-dimensional image in the test image to obtain a feature transformation matrix;
[0039] A mapping module maps the target frame onto a test image using the feature transformation matrix to obtain a test image marked with a mapping frame;
[0040] A first cropping module is used to perform a first cropping on the standard image based on the target frame, cropping out a two-dimensional image and a depth map of the area where the target frame is located; and perform a first cropping on the standard image based on the mapping frame, cropping out a two-dimensional image and a depth map of the area where the mapping frame is located;
[0041] A bolt segmentation network is used to extract a segmentation mask map, which inputs a two-dimensional image and a depth map obtained by first cropping the standard image, and a two-dimensional image and a depth map obtained by first cropping the test image, and outputs a segmentation mask map of the standard image and a segmentation mask map of the test image;
[0042] A second cropping module is used to crop the standard image for a second time based on the minimum circumscribed square of the segmentation mask of the standard image obtained by the bolt segmentation network, that is, to crop the segmentation mask image corresponding to the standard image, the two-dimensional image and the depth map obtained by the first cropping of the standard image, respectively, to obtain the corresponding two-dimensional image, depth map and segmentation mask; and, to crop the test image for a second time based on the minimum circumscribed square of the segmentation mask image of the test image obtained by the bolt segmentation network, that is, to crop the segmentation mask image corresponding to the test image, the two-dimensional image and the depth map obtained by the first cropping of the test image, respectively, to obtain the corresponding two-dimensional image, depth map and segmentation mask;
[0043] The bolt twin classification network is used to determine whether the bolts are loose. It inputs the two-dimensional image, depth map and segmentation mask obtained by the second cropping of the standard image, as well as the two-dimensional image, depth map and segmentation mask obtained by the second cropping of the test image, and outputs the judgment result of whether the bolts are loose.
[0044] Beneficial effects: Due to the adoption of the above technical solution, the present invention has the following beneficial effects:
[0045] The present invention provides a bolt loosening detection method based on RGB-D. The method first needs to determine the area of the bolt by semantic segmentation, and then uses a twin network to determine whether the bolt is loose. The method introduces deep features on the basis of RGB visible light images, that is, uses RGB-D information to segment the bolts, which can not only improve the accuracy of bolt segmentation, but also has good adaptability to difficult scenes where the color difference between the bolt and the background is small due to dirt. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A flow chart of a bolt loosening detection method based on RGB-D is provided for the present invention;
[0047] Figure 2 is the RGB image of the bolts and nuts;
[0048] Figure 3 Depth diagram of bolts and nuts;
[0049] Figure 4 It is a schematic diagram of the structure of the HRnet network;
[0050] Figure 5 Schematic diagram of the structure of the twin network. DETAILED DESCRIPTION
[0051] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0052] The present invention proposes a bolt loosening detection method based on RGB-D, which collects the RGB-D information of the bolt as a test image, and then performs registration based on the RGB information on the standard image and the test image containing the bolt to be detected, and cuts out the RGB image and depth image of the corresponding area from the test image and the standard image according to the registration feature transformation matrix and the bolt position information pre-entered in the standard image. Then, the bolt RGB images cut out from the standard image and the test image are sent to the bolt segmentation network to obtain the bolt segmentation mask, and the RGB image, depth map and segmentation mask containing only the bolt area are obtained according to the segmentation mask, and finally the RGB image, depth map and segmentation mask of the bolt area in the standard image and the test image are sent to the bolt twin classification network to obtain the result of whether the bolt is loose.
[0053] like Figure 1The bolt loosening detection method based on RGB-D is specifically implemented in the following steps:
[0054] Step 1: Construct a standard image of the bolt to be tested
[0055] An RGBD camera is used to collect the two-dimensional image and depth image of the bolts to be inspected. At this time, the bolts to be inspected are in a tightened state. Based on the two-dimensional image of the bolts, a calibration tool is used manually to select the bolts to be inspected, and the target frame information is recorded.
[0056] Limited by the hardware performance of the sensor, the depth value of the same pixel position has random fluctuations when the depth camera acquires the depth map. In order to improve the stability of depth value acquisition and reduce the impact of depth value anomalies on subsequent bolt segmentation and bolt twin network classification, the depth map needs to be filtered in the time domain and space domain. In order to reduce the impact of random fluctuations in depth values, 5 frames of depth maps are collected continuously when collecting bolt depth maps, and they are used as a 5*W*H matrix (5 is the number of channels, W and H are the width and height of the depth map). A 5*5*5 median filter is used to transform the 5 consecutive frames of depth maps into a filtered depth map. The filtered depth map has fewer outliers and is more consistent with the actual real depth. In principle, using more consecutive frames for filtering will give the depth map better performance, but considering that the depth map calculation requires a large amount of calculation, continuously collecting 5 frames of depth maps is a balance between performance and efficiency.
[0057] Step 2: Register the test image of the bolt to be inspected
[0058] The two-dimensional images of the standard image and the test image of the bolt to be inspected are registered. The test image is as follows: Figure 2 and Figure 3 As shown, a two-dimensional image and a depth image are also included.
[0059] Use superpoint+superglue to extract and match feature points to obtain the feature transformation matrix / affine transformation matrix, and map the target frame information obtained based on the bolt position of the standard image to the test image using the feature transformation matrix.
[0060] Compared with traditional feature point extraction and matching algorithms, superpoint+superglue is more robust and can extract more representative feature points. The improvement of feature point quantity and quality can effectively solve the problems of missed detection and false detection caused by the different offsets between the image to be matched and the template image.
[0061] Only the coordinate information of the bolt target frame recorded in step one is mapped according to the feature transformation matrix, instead of registering the test image. In general, the purpose of image registration is to align two pictures to facilitate comparison of the bolt area. However, the registered picture will introduce unpredictable noise due to changes in the camera's viewing angle, which is not conducive to high-precision bolt classification. Therefore, in the solution of the present invention, the precise positioning of the bolt is completed by the segmentation network, and the main purpose of step two is to obtain the rough position of the bolt.
[0062] Step 3: Segment and extract the mask of the bolt to be detected
[0063] Based on the bolt target frame information recorded in step 1, the 2D image and depth map of the corresponding area are cropped from the standard image. Based on the bolt registration target frame information obtained in step 2, the 2D image and depth map of the corresponding area are cropped from the test image. The 2D image and depth map cropped from the standard image and test image are respectively sent to the segmentation network as the two inputs of the bolt segmentation network to obtain the segmentation masks of the bolts in the standard image and test image.
[0064] The value of each pixel in the depth map is the actual physical distance from the position to the optical center of the camera. The depth map can naturally reflect the height difference, and the bolts are usually not at the same height as the fastened equipment. The intuitive manifestation of this height difference in the depth map is that there is a clear boundary between the bolt area and the surrounding area. This boundary is very beneficial for improving the accuracy of bolt segmentation. The solution of the present invention uses an RGBD-based bolt segmentation network. The goal of the segmentation network is to obtain the contour mask of the bolt, and the depth map can provide sufficient contour prior information for the segmentation network. Because the depth map features can reflect the depth information of different targets, the bolts are usually in different planes from the fastened parts, and the depth information will reflect the contour information of the bolts.
[0065] Bolts are usually small. In order to obtain segmentation results with higher accuracy, HRnet is used as the backbone of the network. HRnet fully guarantees the resolution of the feature map output by the segmentation network, and at the same time makes a good fusion of detail information and high-dimensional features, thereby ensuring the excellent performance of the segmentation results, especially the segmentation boundaries. HRnet is a parallel connection network that will better balance semantic information and location information.
[0066] For the bolt segmentation network, in order to better fuse the features of the depth map and the two-dimensional image, both are used as the two inputs of the network. The two-dimensional image is preprocessed by subtracting the mean and dividing the variance before entering the network, and the depth values in the depth map are normalized to between 0 and 1.
[0067] like Figure 4As shown in the figure, the preprocessed two-dimensional image and depth map pass through two sub-networks respectively. The output dimensions of the two sub-networks are the same, which can make the number of channels of the two-dimensional image and the depth map consistent. The two-dimensional image and the depth map can only use their own information in their respective sub-networks, which is conducive to extracting more effective and expressive features when training the bolt segmentation network. Considering the actual business scenario, the environment where bolt defect analysis is required usually has a large number of bolts, and there are certain requirements for the timeliness of analysis. The sub-network can use Mobilenet, which has a small amount of calculation. The output of the sub-network is superimposed on the channel. The superimposed feature map enters the backbone HRnet of the segmentation network to further extract features and finally obtain the segmentation mask.
[0068] Step 4: Obtain the 2D image and depth map of the bolt to be detected
[0069] Based on the minimum circumscribed square of the bolt segmentation mask in the standard image obtained in step three, the corresponding areas are cropped from the segmentation mask image, the two-dimensional image and the depth map respectively; based on the minimum circumscribed square of the bolt segmentation mask in the test image obtained in step three, the corresponding areas are cropped from the segmentation mask image, the two-dimensional image and the depth map respectively.
[0070] It should be noted that, since the bolts in the standard drawing are manually annotated in step one, different annotators have different annotation methods and annotation skills, which will lead to slight differences in the annotation results of the bolts. In step two, when the standard drawing and the test drawing are aligned, it is also limited by the performance of the alignment algorithm, and it is difficult to obtain a very high-quality affine transformation matrix. The mapping frame obtained directly using the manual annotation results and the affine transformation matrix naturally has a certain deviation. Therefore, secondary segmentation using the minimum circumscribed square of the segmentation mask can reduce the spatial position difference between the standard drawing and the test drawing.
[0071] Step 5: The twin network determines whether the bolt is loose
[0072] The cropped 2D image, depth map and segmentation mask of the bolt in the standard image obtained in step 4 are used as input 1 of the twin network, and the cropped 2D image, depth map and segmentation mask of the bolt in the test image obtained in step 4 are used as input 2 of the twin network. The twin network extracts the feature vectors of input 1 and input 2, and uses the classification network to output the result of whether the bolt is loose.
[0073] like Figure 5As shown in the figure, the backbone of the twin network is resnet18, and the input resolution is 128*128. The two-dimensional image is preprocessed by subtracting the mean and dividing the variance, and the depth map is normalized to between 0-1. The segmentation mask values are 0 and 1, with the foreground being 1 and the background being 0. As a kind of artificially provided prior knowledge, the segmentation mask will guide the network to pay more attention to the changes in the bolt body rather than the background. The data fused from these three inputs is used as the network input, and the standard image and the test image are input into the backbone of the twin network to extract the corresponding feature vectors. The feature vectors of the two parts are stacked and input into the classification head, and the fully connected layer determines whether the result is loose.
[0074] In the present invention, the bolt segmentation network and the bolt twin classification network are trained separately and independently. Figure 5 As shown in the figure, for the twin classification network, its input contains two branches, and the two branches share the network structure and parameters. Similar to the bolt segmentation network, the input two-dimensional image and depth image of each branch of the bolt twin classification network pass through their own sub-networks. The two-dimensional image and the depth image belong to different physical information. Through the sub-network, their inherent unique features can be extracted, and the feature dimensions of the output are unified, which is convenient for the subsequent superposition of the two features. In the bolt twin classification network, Mobilenet is combined with the backbone resnet to fully meet the timeliness and performance requirements.
[0075] The bolt twin classification network also adds the segmentation mask after the second cropping to the input of the two sub-networks. As a kind of artificially provided prior knowledge, the segmentation mask directly guides the network to focus on the bolt body area rather than the background part, which can significantly reduce the false alarms caused by background changes. Such false alarms usually occur in: 1. Due to factors such as rain and light, the background area of the two-dimensional image of the test image has obvious changes; 2. Due to factors such as mud and dirt, the background area of the depth map of the test image has obvious changes. These two situations are very common in actual working environments. The segmentation mask as part of the network input can significantly reduce such false alarms.
[0076] The three sources of information for the bolt twin classification network: two-dimensional image, depth image, and segmentation mask, each with its own division of labor. The segmentation mask directly guides the network to focus on the bolt area itself, reducing false detections caused by changes in the background area. The network input is a secondary mask obtained by multiple cropping, which can better improve the performance of the bolt twin classification network. The two-dimensional image can extract the difference in RGB information between the standard image and the test image. This difference can be caused by loose bolts, or by light, rain, and stains. The depth map can extract the difference in spatial structure between the standard image and the test image. This difference is usually caused by loose bolts, but it is difficult to distinguish subtle differences. For image differences caused by light, the bolt depth feature can filter out such false defects; for insignificant spatial differences in bolts, the two-dimensional image information can supplement sufficient information for detecting such potential defects. Therefore, the present invention combines these three pieces of information together, which can fully cope with various environments, while ensuring low false alarms and high detection performance.
[0077] The above description is only a preferred specific implementation manner of the present invention. It should be pointed out that the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A bolt loosening detection method based on RGB-D, characterized in that: Includes steps: S1. Collect a defect-free two-dimensional image and a depth map of the bolt to be inspected in the initial tightening state as a standard map; collect a two-dimensional image and a depth map of the bolt to be inspected in the real-time state as a test map; S2. For the two-dimensional image in the standard image, use the calibration tool box to select the bolt to be detected and record the information of the target box; S3, registering the two-dimensional image in the standard image with the two-dimensional image in the test image to obtain a feature transformation matrix; S4, mapping the target frame onto the test image using the feature transformation matrix to obtain a test image marked with a mapping frame; S5, performing a first cropping of the standard image based on the target frame, cropping out a two-dimensional image and a depth map of the area where the target frame is located; performing a first cropping of the test image based on the mapping frame, cropping out a two-dimensional image and a depth map of the area where the mapping frame is located; S6, constructing a bolt segmentation network, wherein the bolt segmentation network inputs a two-dimensional image and a depth map obtained by first cropping the standard image, and a two-dimensional image and a depth map obtained by first cropping the test image, and outputs a segmentation mask map of the standard image and a segmentation mask map of the test image; S7, based on the minimum circumscribed square of the segmentation mask image of the standard image obtained in step S6, the standard image is cropped for the second time, that is, the segmentation mask image corresponding to the standard image, the two-dimensional image and the depth map obtained by the first cropping of the standard image are cropped respectively to obtain the corresponding two-dimensional image, depth map and segmentation mask; Based on the minimum circumscribed square of the segmentation mask image of the test image obtained in step S6, the test image is cropped for the second time, that is, the segmentation mask image corresponding to the test image, the two-dimensional image and the depth map obtained by the first cropping of the test image are cropped respectively to obtain the corresponding two-dimensional image, depth map and segmentation mask; S8. Construct a bolt twin classification network, which inputs the two-dimensional image, depth map and segmentation mask obtained by the second cropping of the standard image, and the two-dimensional image, depth map and segmentation mask obtained by the second cropping of the test image, and outputs a judgment result of whether the bolt is loose.
2. The bolt loosening detection method based on RGB-D according to claim 1, characterized in that: In step S1, the two-dimensional image and the depth map corresponding to the standard image or the test image are collected in the following manner: Use an RGBD camera to collect the RGB image of the bolt to be inspected as a 2D image of the standard image or test image; Use an RGBD camera to continuously collect 5 frames of depth maps to form a 5*W*H depth map matrix, where W and H are the width and height of the depth map respectively; use the 5*5*5 median to perform median filtering on the depth map matrix, and use the filtered image as the depth map of the standard image or test image.
3. The bolt loosening detection method based on RGB-D according to claim 1, characterized in that: In step S3, the superpoint+superglue model is used to align the two-dimensional image in the standard image with the two-dimensional image in the test image to obtain a feature transformation matrix.
4. The method for detecting bolt looseness based on RGB-D according to claim 1, characterized in that: In step S6, the bolt segmentation network includes two independent branch networks, which are respectively used to input the two-dimensional image and the depth map obtained by the first cropping of the standard image and the two-dimensional image and the depth map obtained by the first cropping of the test image; The structures of the two branch networks are the same, including: The first two-dimensional image preprocessing module is used to input a two-dimensional image and perform mean subtraction and variance division processing; A depth map normalization module 1, used to input a depth map and perform normalization processing on the depth value; Subnetwork 1, with two components, one for receiving the preprocessed 2D image and the other for receiving the normalized depth map, extracting feature vectors and outputting feature maps of the same dimension; The superposition module 1 is used to perform superposition processing on the feature maps output by the two sub-networks 1; The backbone network uses the HRnet network to input the feature map output by the superposition module 1 and extract the segmentation mask map; The output module is used to output the segmentation mask map extracted by the backbone network.
5. The method for detecting bolt looseness based on RGB-D according to claim 1, characterized in that: In the step S8, the bolt twin classification network includes net1, net2, a stacking module and a classification module, which are respectively used to input the two-dimensional image, the depth map and the segmentation mask obtained by the second cropping of the standard image, and the two-dimensional image, the depth map and the segmentation mask obtained by the second cropping of the test image; The outputs of net1 and net2 are connected to a stacking module, which is used to stack the weights of net1 and net2 for sharing. The outputs of net1 and net2 are connected to a feature vector output by the stacking module. The classification module determines whether the bolt is loose based on the stacked feature vector. The structures of net1 and net2 are the same, both of which include: The second two-dimensional image preprocessing module is used to input a two-dimensional image and perform mean subtraction and variance division processing; The depth map normalization module 2 is used to input the depth map and normalize the depth value; Subnetwork 2, with two components, one for receiving the preprocessed 2D image and segmentation mask, and the other for receiving the normalized depth map and segmentation mask, extracting feature vectors and outputting feature maps of the same dimension; The superposition module 2 is used to perform superposition processing on the feature maps output by the two sub-networks 2; The backbone network uses the Resnet18 network to input the feature map output by the superposition module 2 and extract the feature vector.
6. A bolt loosening detection device based on RGB-D, characterized in that: The device includes: An image acquisition module is used to acquire a defect-free two-dimensional image and a depth map of the bolt to be inspected in an initial tightening state as a standard image; and, collecting a two-dimensional image and a depth map of the bolt to be inspected in real time as a test map; A standard image calibration module is used to select the bolt to be detected using a calibration tool box for the two-dimensional image in the standard image, and record the information of the target box; A registration module is used to register the two-dimensional image in the standard image with the two-dimensional image in the test image to obtain a feature transformation matrix; A mapping module maps the target frame onto a test image using the feature transformation matrix to obtain a test image marked with a mapping frame; A first cropping module, used to perform a first cropping on the standard image based on the target frame, and crop a two-dimensional image and a depth map of the area where the target frame is located; and, performing a first cropping of the standard image based on the mapping frame to crop out a two-dimensional image and a depth map of the area where the mapping frame is located; A bolt segmentation network is used to extract a segmentation mask map, which inputs a two-dimensional image and a depth map obtained by first cropping the standard image, and a two-dimensional image and a depth map obtained by first cropping the test image, and outputs a segmentation mask map of the standard image and a segmentation mask map of the test image; A second cropping module is used to crop the standard image for the second time based on the minimum circumscribed square of the segmentation mask image of the standard image obtained by the bolt segmentation network, that is, the segmentation mask image corresponding to the standard image, the two-dimensional image and the depth map obtained by the first cropping of the standard image are cropped respectively to obtain the corresponding two-dimensional image, depth map and segmentation mask; And, based on the minimum circumscribed square of the segmentation mask image of the test image obtained by the bolt segmentation network, the test image is cropped for the second time, that is, the segmentation mask image corresponding to the test image, the two-dimensional image and the depth map obtained by the first cropping of the test image are cropped respectively to obtain the corresponding two-dimensional image, depth map and segmentation mask; The bolt twin classification network is used to determine whether the bolts are loose. It inputs the two-dimensional image, depth map and segmentation mask obtained by the second cropping of the standard image, as well as the two-dimensional image, depth map and segmentation mask obtained by the second cropping of the test image, and outputs the judgment result of whether the bolts are loose.
Citation Information
Cited By
Multi-modal detection method and system for looseness of bolt fastener
CN119760499A
