Charpy impact sample notch tester and use method thereof
By using an automatic focus high-definition camera and ResNet neural network for gap detection in the Charpy impact specimen notch inspector, and combining the sample automatic alignment mechanism, the existing detection efficiency is solved and the inability to adapt to different detection standards is achieved. Efficient and automatic gap detection and standard adaptation.
Patent Information
- Application Number
- CN202411439021.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-10-15
AI Technical Summary
The existing Shabi impact specimen notch tester has low detection efficiency and cannot adapt to different detection standards at the same time. It is necessary to frequently replace the standard template.
A Shabi impact specimen notch detector was designed, using an automatic focus high-definition camera and ResNet neural network for notch detection, combined with the automatic sample alignment mechanism to automatically identify and adjust the sample position, and support the national standard and ASTM standards. Use at the same time.
It improves detection efficiency, reduces the steps of manually adjusting the sample position, can automatically adapt to different detection standards, and reduces operational complexity and time consumption.
Smart Images

Figure CN119394168A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of Charpy impact specimen notch inspection, and in particular to a Charpy impact specimen notch inspection instrument and a use method thereof. Background Art
[0002] The inspection of the Charpy impact specimen V&U notch after processing is mainly to check whether the V&U notch processing meets the requirements of the test standards. The qualification of the test results directly affects the accuracy of the Charpy impact test results. Unqualified notches cannot be used for the test. It is a necessary step before the test begins. The commonly used V&U notch inspection instrument is an impact specimen notch projector. Its principle is to use two objective lenses to magnify the V&U notch 50 times, and then compare the outline of the V&U notch with the standard V&U notch outline made according to the allowable tolerance requirements of the test standard on the projection screen. If the comparison result is within the range of the test standard, the notch processing is qualified, and if it exceeds the range, the notch processing is unqualified;
[0003] The method of detecting by projector in the prior art has the following disadvantages: 1. The detection efficiency is low. When checking the notch of the specimen, it is necessary to move the specimen left and right and forward and backward on the workbench to align it with the standard template on the projection screen; 2. An impact specimen notch projector can usually only be configured with a standard template of one detection standard, for example, it can only be configured with the national standard. If the test requires testing according to the ASTM standard, it is necessary to configure another notch projector or replace the standard notch template. Frequent replacement of the standard notch template will still affect the detection efficiency, which is very inconvenient. Based on the above situation, the present application proposes a Charpy impact specimen notch inspection instrument and a method for using the same. Summary of the invention
[0004] Based on the technical problems existing in the background technology, the present invention proposes a Charpy impact specimen notch inspection instrument and a use method thereof.
[0005] The present invention provides a Charpy impact specimen notch inspection instrument, comprising a test platform, a specimen automatic straightening mechanism is installed on the top of the test platform, a support rod is fixedly connected to the rear side of the top of the test platform, a host is fixedly connected to the front side of the support rod, a switch button and a USB interface are arranged on the left side of the host, a touch operation screen is arranged on the top of the host, and an auto-focus high-definition camera is fixedly installed on the bottom of the host;
[0006] The host includes an image data preprocessing module, an image storage module, an image processing module, an image recognition and calculation module, a PLC control unit and a battery module. The image storage module is connected to the auto-focus high-definition camera, the USB interface and the image data preprocessing module. The image data preprocessing module is connected to the image processing module and the image recognition and calculation module. The PLC control unit is connected to the image recognition and calculation module and the auto-focus high-definition camera. The image processing module is connected to the touch operation screen.
[0007] Preferably, the automatic specimen straightening mechanism comprises a specimen placement table which is in movable contact with the top of the testing table, a mounting groove is provided on the top of the testing table, a cross-shaped electric slide rail is fixedly connected to the bottom inner wall of the mounting groove, a brake motor is fixedly connected to the top of the sliding end of the cross-shaped electric slide rail, the top of the output shaft of the brake motor is fixedly connected to the bottom of the specimen placement table, and both the cross-shaped electric slide rail and the brake motor are electrically connected to the PLC control unit.
[0008] Preferably, the battery module supplies power to the host, the autofocus high-definition camera is used to take pictures of the notch of the Charpy impact specimen, and the pictures taken are stored through the image storage module. The image data preprocessing module is used to perform data preprocessing of noise reduction filtering on the stored pictures, and also performs brightness adjustment and contrast enhancement to improve the clarity of the picture and prevent excessive errors due to hardware factors. When performing brightness adjustment and contrast enhancement, the parameters of the taken picture are adjusted to the pre-set parameters to adjust the brightness and contrast of the picture, thereby improving the subsequent comparison accuracy.
[0009] Preferably, the image processing module stores national standard and ASTM standard V&U notch standard templates, and the required standard model can be selected by touching the operation screen. The image processing module compares the notch photo taken by the automatic high-definition camera with the selected standard model based on the ResNet neural network to draw a conclusion on whether it is qualified or not.
[0010] The ResNet neural network needs to be trained in advance to form a network, and finally the accuracy is judged by the test set. The specific steps for the formation of the ResNet neural network are as follows:
[0011] (1) Obtain images of Charpy impact specimens in different states, including samples with notches, without notches, and samples of different notch types and sizes, and annotate each specimen image to indicate its notch state and corresponding category. Adjust the specimen images to a uniform size (224x224 pixels) to meet the input requirements of ResNet, scale the pixel values to the [0,1] interval, and use data augmentation techniques (such as rotation, translation, flipping, color adjustment, etc.) to expand the training set.
[0012] (2) Divide the expanded dataset into a training set (70%), a validation set (15%), and a test set (15%) to ensure that the samples in each set are sufficient and representative;
[0013] (3) According to the sample complexity and computing resources, select the appropriate ResNet version (ResNet-50, ResNet-101), build a network containing multiple residual blocks, each residual block includes a convolutional layer, batch normalization and ReLU activation function, and use the He initialization method to set the initial value of the network weight;
[0014] (4) Input the training set samples into the selected ResNet version network, calculate the output, calculate the loss based on the output result and the true label, calculate the gradient of the loss to each parameter through the back propagation algorithm, and use the optimization algorithm to update the weight;
[0015] (5) Evaluate the performance of the model on the validation set, monitor the accuracy and loss of the model, avoid overfitting, and test the model using an unseen data set to evaluate the accuracy, recall, and F1-score indicators. Adjust the model parameters based on the indicators to obtain a trained ResNet neural network.
[0016] (6) Deploy the trained ResNet neural network into practical applications and use the ResNet neural network to perform notch detection on Charpy impact specimens.
[0017] Preferably, the image recognition and calculation module is used to identify the sample notch photo taken by the automatically aligned high-definition camera, and calculate whether the notch position in the photo is offset. When an offset occurs, the cross-shaped electric slide rail is controlled by the PLC control unit to cooperate with the sliding end to adjust the front, back, left and right position of the sample placement table, thereby achieving the purpose of adjusting the position of the Charpy impact sample and achieving the effect of straightening the Charpy impact sample.
[0018] Preferably, the USB interface is connected to an external storage device and is used to transfer the data stored in the image storage module to the external storage device.
[0019] The present invention also provides a method for using a Charpy impact specimen notch inspection instrument, comprising the following steps:
[0020] S1: Place the Charpy impact specimen to be tested flat on the top of the specimen placement table;
[0021] S2: Turn on the host by pressing the switch button, click the photo function on the touch screen, and control the auto-focus high-definition camera through the PLC control unit to take a photo of the Charpy impact specimen notch on the top of the specimen placement table;
[0022] S3: The Charpy impact specimen photograph taken in S2 is stored in the image storage module, and the image data preprocessing module performs data preprocessing of noise reduction filtering on the photograph stored in the image storage module, and also performs brightness adjustment and contrast enhancement to improve the clarity of the image;
[0023] S4: The image recognition calculation module recognizes the photo processed in S3, and calculates the offset of the notch of the Charpy impact specimen in the photo through the offset calculation formula, so as to determine the offset of the Charpy impact specimen. When there is an offset, the cross-shaped electric slide rail and the brake motor are controlled by the PLC control unit according to the calculated offset to drive the specimen placement table to move forward, backward, left, right and 360°, and the specimen placement table drives the Charpy impact specimen on its top to move to the set standard coordinate position.
[0024] S5: After the position of the Charpy impact specimen is adjusted, the standard model to be compared is selected in the image processing module through the touch operation screen. The standard model is one of the national standard and ASTM standard V&U notch standard templates;
[0025] S6: The image processing module compares the notch photo of the Charpy impact specimen with the selected standard model based on the trained ResNet neural network, determines whether the notch is qualified by calculating the similarity, and outputs the result on the touch screen to complete a working cycle of Charpy impact specimen notch inspection.
[0026] Preferably, in S4, the offset of the notch of the Charpy impact specimen in the photo is calculated by using an offset calculation formula, and when the offset of the Charpy impact specimen is determined, the specific steps are as follows:
[0027] S401: extracting features of the image in the processed photo through the trained ResNet neural network, and identifying feature points in the image through an image processing algorithm, wherein the feature points include the edge and midpoint of the gap;
[0028] S402: Calculate the coordinates of the current gap position through the detected key points, define the key position coordinates of the standard gap image in advance, compare the measured coordinates with the coordinates of the standard gap, and obtain the offset. The formula for calculating the offset is: {offset} = (x1-x2, y1-y2);
[0029] Wherein, X1 represents the coordinate value of the actual measured position of the notch extracted from the currently captured sample image by the image recognition calculation module on the horizontal axis (x-axis), y1 represents the coordinate value of the actual measured position of the notch extracted from the currently captured sample image by the image recognition calculation module on the vertical axis (y-axis), X2 represents the coordinate value of the preset standard notch position on the horizontal axis (x-axis), y2 represents the coordinate value of the preset standard notch position on the vertical axis (y-axis), and {offset} represents the degree of deviation of the currently measured notch position relative to the standard position;
[0030] S403: Set a reasonable offset threshold as {threshold} = {(x_{\{threshold})^2+(y_{threshold})^2}, compare the absolute value of the calculated offset {offset} with the threshold, if {offset}>{threshold}, it is determined that the sample position is offset, otherwise it is not offset.
[0031] Preferably, in S6, the image processing module compares the notch photo of the Charpy impact specimen with the selected standard model based on the trained ResNet neural network to determine whether the notch is qualified or not. The specific logical steps are as follows:
[0032] S601: Inputting the photo data processed by the image data preprocessing module into the trained ResNet neural network;
[0033] S602: The ResNet neural network extracts features of the gapped photos in the photo data input in S601;
[0034] S603: Compare the features extracted in S602 with the features of the standard model by calculating similarity, and output a qualified or unqualified conclusion through the ResNet neural network;
[0035] When calculating similarity, cosine similarity is used for calculation, and its formula is: [{cosine_similarity}(A,B)={A\cdot B}{|A||B|}={\sum_{i=1}^{n}A_i B_i}{{\sum_{i=1}^{n}A_i^2}{\sum_{i=
[0036] 1}^{n}B_i^2}}];
[0037] Where (A) and (B) are two feature vectors to be compared, (A\cdotB) is their dot product, (|A|) and (|B|) are the norms of the vectors, and the output cosine similarity value is between -1 and 1. The closer it is to 1, the more similar the two vectors are.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] 1. By combining the image recognition calculation module with the automatic specimen alignment mechanism, the offset of the placed Charpy impact specimen can be identified and judged by calculating the offset, and the Charpy impact specimen can be automatically aligned and adjusted to the standard coordinate position when it is offset. This method does not require personnel to adjust the Charpy impact specimen back and forth, thereby improving the detection efficiency;
[0040] 2. Through the coordination of the image data preprocessing module and the image processing module, the national standard and ASTM standard V&U notch standard templates can be stored in the image processing module at the same time, and the notch photo of the Charpy impact specimen can be directly compared with the corresponding standard model based on the ResNet neural network to determine the qualified situation. This direct selection and comparison method can be applied to different notch detection needs, and there is no need for personnel to frequently change the standard notch template, which increases the scope of application and reduces the operation steps;
[0041] The present invention can automatically identify and adjust the position of the Charpy impact specimen to be tested, and does not require personnel to adjust the Charpy impact specimen back and forth, thereby improving the detection efficiency. In addition, the notch photo of the Charpy impact specimen can be directly compared with the corresponding standard model based on the ResNet neural network during detection to determine the qualified status. This direct selection and comparison method can be suitable for different notch detection needs, does not require personnel to frequently change the standard notch template, reduces the operation steps, and further improves the detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of the structure of a Charpy impact specimen notch inspection instrument proposed by the present invention;
[0043] Figure 2 It is a structural schematic diagram of a Charpy impact specimen notch inspection instrument proposed by the present invention, in which a specimen placement plate is not installed;
[0044] Figure 3 A block diagram of the connection between an auto-focus high-definition camera, a host computer and a cross-shaped electric slide rail in a Charpy impact specimen notch inspection instrument proposed by the present invention;
[0045] Figure 4 A schematic diagram of a Chinese standard V&U notch standard template for a method of using a Charpy impact specimen notch inspection instrument proposed by the present invention;
[0046] Figure 5 A schematic diagram of an ASTM standard V&U notch standard template in a method for using a Charpy impact specimen notch inspection instrument proposed in the present invention.
[0047] In the figure: 1. test table; 2. support rod; 3. host; 301. touch operation screen; 302. switch button; 303. USB interface; 4. autofocus high-definition camera; 5. sample placement table; 6. cross-shaped electric slide rail; 601. sliding end; 7. brake motor. DETAILED DESCRIPTION
[0048] The present invention will be further explained below in conjunction with specific embodiments.
[0049] Example
[0050] Reference Figure 1-5 This embodiment provides a Charpy impact specimen notch inspection instrument, including a test platform 1, a specimen automatic alignment mechanism is installed on the top of the test platform 1,
[0051] The automatic sample alignment mechanism includes a sample placement table 5 that is in active contact with the top of the test table 1. A mounting groove 101 is provided on the top of the test table 1. A cross-shaped electric slide rail 6 is fixedly connected to the bottom inner wall of the mounting groove 101. A brake motor 7 is fixedly connected to the top of the sliding end 601 of the cross-shaped electric slide rail 6. The top of the output shaft of the brake motor 7 is fixedly connected to the bottom of the sample placement table 5.
[0052] A support rod 2 is fixedly connected to the top rear side of the testing platform 1, a host 3 is fixedly connected to the front side of the support rod 2, a switch button 302 and a USB interface 303 are arranged on the left side of the host 3, a touch operation screen 301 is arranged on the top of the host 3, and an auto-focus high-definition camera 4 is fixedly installed on the bottom of the host 3;
[0053] The host 3 includes an image data preprocessing module, an image storage module, an image processing module, an image recognition and calculation module, a PLC control unit and a battery module. The image storage module is connected to the auto-focus high-definition camera 4, the USB interface 303 and the image data preprocessing module. The image data preprocessing module is connected to the image processing module and the image recognition and calculation module. The PLC control unit is connected to the image recognition and calculation module and the auto-focus high-definition camera 4. The image processing module is connected to the touch operation screen 301. The cross-shaped electric slide rail 6 and the brake motor 7 are both electrically connected to the PLC control unit.
[0054] The battery module supplies power to the host 3, the auto-focus high-definition camera 4 is used to take pictures of the notch of the Charpy impact specimen, and the pictures taken are stored by the image storage module. The USB interface 303 is connected to an external storage device, and is used to transfer the data stored in the image storage module to the external storage device. The storage method facilitates the archiving of notch inspection data and the tracing of specimen processing, and avoids the disadvantage that the existing notch projector cannot store pictures.
[0055] The image data preprocessing module is used to perform data preprocessing of noise reduction filtering on the stored photos, and also performs brightness adjustment and contrast enhancement to improve the clarity of the picture and prevent excessive errors caused by hardware factors;
[0056] The image processing module stores the national standard and ASTM standard V&U notch standard templates. The required standard model can be selected through the touch operation screen. The image processing module compares the notch photo taken by the automatic high-definition camera 4 with the selected standard model based on the ResNet neural network to draw a conclusion on whether it is qualified or not.
[0057] The ResNet neural network needs to be trained in advance to form a network, and finally the accuracy is judged by the test set. The specific steps for the formation of the ResNet neural network are as follows:
[0058] (1) Obtain images of Charpy impact specimens in different states, including samples with notches, without notches, and samples of different notch types and sizes, and annotate each specimen image to indicate its notch state and corresponding category. Adjust the specimen images to a uniform size (224x224 pixels) to meet the input requirements of ResNet, scale the pixel values to the [0,1] interval, and use data augmentation techniques (such as rotation, translation, flipping, color adjustment, etc.) to expand the training set.
[0059] (2) Divide the expanded dataset into a training set (70%), a validation set (15%), and a test set (15%) to ensure that the samples in each set are sufficient and representative;
[0060] (3) According to the sample complexity and computing resources, select the appropriate ResNet version (ResNet-50, ResNet-101), build a network containing multiple residual blocks, each residual block includes a convolutional layer, batch normalization and ReLU activation function, and use the He initialization method to set the initial value of the network weight;
[0061] (4) Input the training set samples into the selected ResNet version network, calculate the output, calculate the loss based on the output result and the true label, calculate the gradient of the loss to each parameter through the back propagation algorithm, and use the optimization algorithm to update the weight;
[0062] (5) Evaluate the performance of the model on the validation set, monitor the accuracy and loss of the model, avoid overfitting, and test the model using an unseen data set to evaluate the accuracy, recall, and F1-score indicators. Adjust the model parameters based on the indicators to obtain a trained ResNet neural network.
[0063] (6) Deploy the trained ResNet neural network to practical applications and use the ResNet neural network to perform notch detection on Charpy impact specimens;
[0064] The image recognition and calculation module is used to identify the sample notch photo taken by the automatic alignment high-definition camera 4, and calculate whether the notch position in the photo is offset. When offset occurs, the cross-shaped electric slide rail 6 is controlled by the PLC control unit to cooperate with the sliding end 601 to adjust the front, back, left and right positions of the sample placement table 5, so as to achieve the purpose of adjusting the position of the Charpy impact sample and achieve the effect of straightening the Charpy impact sample. This adjustment method avoids the shortcomings of the original notch projector that requires manual back and forth adjustment of the sample position and manual focusing of the objective lens.
[0065] This embodiment also provides a method for using the Charpy impact specimen notch inspection instrument, comprising the following steps:
[0066] S1: Place the Charpy impact specimen to be tested flat on the top of the specimen placement table 5;
[0067] S2: Turn on the host 3 through the switch button 302, click the photo function on the touch operation screen 301, and control the auto-focus high-definition camera 4 through the PLC control unit to start taking a photo of the Charpy impact specimen notch on the top of the specimen placement table 5;
[0068] S3: The Charpy impact specimen photograph taken in S2 is stored in the image storage module, and the image data preprocessing module performs data preprocessing of noise reduction filtering on the photograph stored in the image storage module, and also performs brightness adjustment and contrast enhancement to improve the clarity of the image;
[0069] S4: The image recognition calculation module recognizes the photo processed in S3, and calculates the offset of the notch of the Charpy impact specimen in the photo by using the offset calculation formula, so as to determine the offset of the Charpy impact specimen. The specific steps are as follows:
[0070] S401: extracting features of the image in the processed photo through the trained ResNet neural network, and identifying feature points in the image through an image processing algorithm, wherein the feature points include the edge and midpoint of the gap;
[0071] S402: Calculate the coordinates of the current gap position through the detected key points, define the key position coordinates of the standard gap image in advance, compare the measured coordinates with the coordinates of the standard gap, and obtain the offset. The formula for calculating the offset is: {offset} = (x1-x2, y1-y2);
[0072] Wherein, X1 represents the coordinate value of the actual measured position of the notch extracted from the currently captured sample image by the image recognition calculation module on the horizontal axis (x-axis), y1 represents the coordinate value of the actual measured position of the notch extracted from the currently captured sample image by the image recognition calculation module on the vertical axis (y-axis), X2 represents the coordinate value of the preset standard notch position on the horizontal axis (x-axis), y2 represents the coordinate value of the preset standard notch position on the vertical axis (y-axis), and {offset} represents the degree of deviation of the currently measured notch position relative to the standard position;
[0073] S403: Set a reasonable offset threshold as {threshold}={(x_{\{threshold})^2+(y_{threshold})^2}, compare the absolute value of the calculated offset {offset} with the threshold, if {offset}>{threshold}, it is determined that the sample position is offset, otherwise it is not offset;
[0074] For example: Set the standard position to (x1, y1) = (100, 150);
[0075] The position measured by the captured image is (X2, y2) = (105, 148);
[0076] {Offset}=(105-100,148-150)=(5,-2), indicating that the current measurement position is offset by 5 units on the x-axis and -2 units on the y-axis relative to the standard position. The absolute value of the offset is {Offset}|={(5)^2+(-2)^2}={25+4}={29}\approx 5.39]. If the threshold is set to 6, {Offset}(5.39)<{Threshold}(6), indicating that the captured image is not offset.
[0077] When there is an offset, the cross-shaped electric slide rail 6 and the brake motor 7 are controlled by the PLC control unit according to the calculated offset to drive the sample placement table 5 to move forward, backward, left, right and rotate 360 degrees, and the sample placement table 5 drives the Charpy impact sample on the top to move to the set standard coordinate position;
[0078] S5: After the position of the Charpy impact specimen is adjusted, the standard model to be compared is selected in the image processing module by touching the operation screen 301, and the standard model is one of the national standard and ASTM standard V&U notch standard templates;
[0079] S6: The image processing module compares the notch photo of the Charpy impact specimen with the selected standard model based on the trained ResNet neural network, determines whether the notch is qualified by calculating the similarity, and outputs the result on the touch operation screen 301, completing a working cycle of Charpy impact specimen notch inspection.
[0080] In S6 of this embodiment, the image processing module compares the notch photo of the Charpy impact specimen with the selected standard model based on the trained ResNet neural network to determine whether the notch is qualified or not. The specific logical steps are as follows:
[0081] S601: Inputting the photo data processed by the image data preprocessing module into the trained ResNet neural network;
[0082] S602: The ResNet neural network extracts features of the gapped photos in the photo data input in S601;
[0083] S603: Compare the features extracted in S602 with the features of the standard model by calculating similarity, and output a qualified or unqualified conclusion through the ResNet neural network;
[0084] When calculating similarity, cosine similarity is used for calculation, and its formula is: [{cosine_similarity}(A,B)={A\cdot B}{|A||B|}={\sum_{i=1}^{n}A_i B_i}{{\sum_{i=1}^{n}A_i^2}{\sum_{i=
[0085] 1}^{n}B_i^2}}];
[0086] Where (A) and (B) are two feature vectors to be compared, (A\cdotB) is their dot product, (|A|) and (|B|) are the norms of the vectors, and the output cosine similarity value is between -1 and 1. The closer it is to 1, the more similar the two vectors are.
[0087] For example, the notch photo feature (A) [A = [0.1, 0.5, 0.3, 0.7, 0.2], the standard model feature (B) [B = [0.2, 0.4, 0.3, 0.6, 0.1]];
[0088] Use the cosine similarity formula to calculate the product points: [A\cdot B=(0.1*0.2)+(0.5*0.4)+(0.3*0.3)+(0.7*0.6)+(0.2*0.1)][=0.02+0.20+0.09+0.42+0.02=0.75];
[0089] Compute the computational norms (|A|) and (|B|):
[0090] [|A|={(0.1^2)+(0.5^2)+(0.3^2)+(0.7^2)+(0.2^2)}={0.01+0.25+0.09+0.49+0.04}={0.88}\approx 0.93];
[0091] [|B|={(0.2^2)+(0.4^2)+(0.3^2)+(0.6^2)+(0.1^2)}={0.04+0.16+0.09+0.36+0.01}={0.66}\approx 0.81];
[0092] Calculate cosine similarity: {cosine_similarity}(A,B)={0.75}{(0.93*0.81)}\approx{0.75}{0.7533}\approx 0.995;
[0093] The calculated result is 0.995, because the value close to 1 indicates that the gap photo in the photo data is very similar to the standard model, so the output result is qualified;
[0094] This embodiment can automatically identify and adjust the position of the Charpy impact specimen to be tested, without the need for personnel to adjust the Charpy impact specimen back and forth, thereby improving the detection efficiency. In addition, the notch photo of the Charpy impact specimen can be directly compared with the corresponding standard model based on the ResNet neural network during detection to determine the qualified status. This direct selection and comparison method can be suitable for different notch detection needs, without the need for personnel to frequently change the standard notch template, reducing the operation steps and further improving the detection efficiency.
[0095] The above description is only a preferred specific implementation manner of the present invention, but 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 Charpy impact specimen notch inspection instrument, comprising a testing platform (1), characterized in that: The top of the test platform (1) is provided with a sample automatic alignment mechanism, the rear side of the top of the test platform (1) is fixedly connected to a support rod (2), the front side of the support rod (2) is fixedly connected to a host (3), a switch button (302) and a USB interface (303) are arranged on the left side of the host (3), a touch operation screen (301) is arranged on the top of the host (3), and an auto-focus high-definition camera (4) is fixedly installed on the bottom of the host (3); The host (3) comprises an image data preprocessing module, an image storage module, an image processing module, an image recognition and calculation module, a PLC control unit and a battery module; the image storage module is connected to an auto-focus high-definition camera (4), a USB interface (303) and the image data preprocessing module; the image data preprocessing module is connected to the image processing module and the image recognition and calculation module; the PLC control unit is connected to the image recognition and calculation module and the auto-focus high-definition camera (4); and the image processing module is connected to a touch operation screen (301).
2. A Charpy impact specimen notch inspection instrument according to claim 1, characterized in that: The automatic sample alignment mechanism comprises a sample placement table (5) in active contact with the top of the test table (1); a mounting groove (101) is provided on the top of the test table (1); a cross-shaped electric slide rail (6) is fixedly connected to the bottom inner wall of the mounting groove (101); a brake motor (7) is fixedly connected to the top of the sliding end (601) of the cross-shaped electric slide rail (6); the top of the output shaft of the brake motor (7) is fixedly connected to the bottom of the sample placement table (5); and both the cross-shaped electric slide rail (6) and the brake motor (7) are electrically connected to a PLC control unit.
3. The Charpy impact specimen notch inspection instrument according to claim 1, characterized in that: The battery module supplies power to the host (3); the auto-focus high-definition camera (4) is used to take photos of the notch of the Charpy impact specimen; the photos taken are stored by the image storage module; the image data preprocessing module is used to perform data preprocessing of noise reduction filtering on the stored photos, and also performs brightness adjustment and contrast enhancement to improve the clarity of the images.
4. The Charpy impact specimen notch inspection instrument according to claim 1, characterized in that: The image processing module stores national standard and ASTM standard V&U notch standard templates, and the required standard model can be selected through the touch operation screen. The image processing module compares the notch photo taken by the automatic alignment high-definition camera (4) with the selected standard model based on the ResNet neural network to draw a conclusion on whether it is qualified or not. The ResNet neural network needs to be trained in advance to form a network, and finally the accuracy is judged by the test set. The specific steps for the formation of the ResNet neural network are as follows: (1) Obtain images of Charpy impact specimens in different states, including samples with notches, without notches, and samples of different notch types and sizes, and annotate each specimen image to indicate its notch state and corresponding category. The specimen images are resized to a uniform size to meet the input requirements of ResNet, pixel values are scaled to the [0, 1] interval, and data augmentation techniques are used to expand the training set. (2) Divide the expanded dataset into a training set (70%), a validation set (15%), and a test set (15%) to ensure that the samples in each set are sufficient and representative; (3) According to the sample complexity and computing resources, select the appropriate ResNet version and build a network containing multiple residual blocks. Each residual block includes a convolutional layer, batch normalization, and ReLU activation function, and use the He initialization method to set the initial value of the network weight; (4) Input the training set samples into the selected ResNet version network, calculate the output, calculate the loss based on the output result and the true label, calculate the gradient of the loss to each parameter through the back propagation algorithm, and use the optimization algorithm to update the weight; (5) Evaluate the performance of the model on the validation set, monitor the accuracy and loss of the model, avoid overfitting, and test the model using an unseen data set to evaluate the accuracy, recall, and F1-score indicators. Adjust the model parameters based on the indicators to obtain a trained ResNet neural network. (6) Deploy the trained ResNet neural network into practical applications and use the ResNet neural network to perform notch detection on Charpy impact specimens.
5. The Charpy impact specimen notch inspection instrument according to claim 2, characterized in that: The image recognition calculation module is used to recognize the sample notch photo taken by the automatic alignment high-definition camera (4), calculate whether the notch position in the photo is offset, and when offset occurs, control the cross-shaped electric slide rail (6) through the PLC control unit to cooperate with the sliding end (601) to adjust the front, back, left, and right positions of the sample placement table (5).
6. The Charpy impact specimen notch inspection instrument according to claim 1, characterized in that: The USB interface (303) is connected to an external storage device and is used to transfer the data stored in the image storage module to the external storage device.
7. A method for using a Charpy impact specimen notch inspection instrument, characterized in that: The following steps are involved: S1: Place the Charpy impact specimen to be tested flat on the top of the specimen placement table (5); S2: Turn on the host (3) by means of a switch button (302), click on the photo function on the touch operation screen (301), and control the auto-focus high-definition camera (4) by means of a PLC control unit to start taking photos of the Charpy impact specimen notch on the top of the specimen placement table (5); S3: The Charpy impact specimen photograph taken in S2 is stored in the image storage module, and the image data preprocessing module performs data preprocessing of noise reduction filtering on the photograph stored in the image storage module, and also performs brightness adjustment and contrast enhancement to improve the clarity of the image; S4: The image recognition calculation module recognizes the photo processed in S3, and calculates the offset of the notch of the Charpy impact specimen in the photo through the offset calculation formula, thereby determining the offset of the Charpy impact specimen. When there is an offset, the cross-shaped electric slide rail (6) and the brake motor (7) are controlled by the PLC control unit according to the calculated offset to drive the sample placement table (5) to move forward, backward, left, right, and rotate 360 degrees, and the sample placement table (5) drives the Charpy impact specimen on its top to move to the set standard coordinate position. S5: After the position of the Charpy impact specimen is adjusted, a standard model to be compared is selected in the image processing module through the touch operation screen (301), wherein the standard model is one of the national standard and ASTM standard V&U notch standard templates; S6: The image processing module compares the notch photo of the Charpy impact specimen with the selected standard model based on the trained ResNet neural network, determines whether the notch is qualified by calculating the similarity, and outputs the result and displays it on the touch operation screen (301), thus completing a working cycle of Charpy impact specimen notch inspection.
8. The method for using the Charpy impact specimen notch inspection instrument according to claim 7, characterized in that: In S4, the offset of the notch of the Charpy impact specimen in the photo is calculated by the offset calculation formula, and the offset of the Charpy impact specimen is determined, and the specific steps are as follows: S401: extracting features of the image in the processed photo through the trained ResNet neural network, and identifying feature points in the image through an image processing algorithm, wherein the feature points include the edge and midpoint of the gap; S402: Calculate the coordinates of the current gap position through the detected key points, define the key position coordinates of the standard gap image in advance, compare the measured coordinates with the coordinates of the standard gap, and obtain the offset. The formula for calculating the offset is: {offset} = (x1-x2, y1-y2); Wherein, X1 represents the coordinate value of the actual measured position of the notch extracted from the currently captured sample image by the image recognition calculation module on the horizontal axis (x-axis), y1 represents the coordinate value of the actual measured position of the notch extracted from the currently captured sample image by the image recognition calculation module on the vertical axis (y-axis), X2 represents the coordinate value of the preset standard notch position on the horizontal axis (x-axis), y2 represents the coordinate value of the preset standard notch position on the vertical axis (y-axis), and {offset} represents the degree of deviation of the currently measured notch position relative to the standard position; S403: Set a reasonable offset threshold as {threshold} = {(x_{\{threshold})^2+(y_{threshold})^2}, compare the absolute value of the calculated offset {offset} with the threshold, if {offset}>{threshold}, it is determined that the sample position is offset, otherwise it is not offset.
9. The method for using the Charpy impact specimen notch inspection instrument according to claim 7, characterized in that: In S6, the image processing module compares the notch photo of the Charpy impact specimen with the selected standard model based on the trained ResNet neural network to determine whether the notch is qualified or not. The specific logical steps are as follows: S601: Inputting the photo data processed by the image data preprocessing module into the trained ResNet neural network; S602: The ResNet neural network extracts features of the gapped photos in the photo data input in S601; S603: Compare the features extracted in S602 with the features of the standard model by calculating similarity, and output a qualified or unqualified conclusion through the ResNet neural network; When calculating similarity, cosine similarity is used for calculation, and its formula is: [{cosine_similarity}(A,B)={A\cdot B}{|A||B|}={\sum_{i=1}^{n}A_iB_i}{{\sum_{i=1}^{n}A_i^2}{\sum_{i= 1}^{n}B_i^2}}]; Where (A) and (B) are two feature vectors to be compared, (A\cdotB) is their dot product, (|A|) and (|B|) are the norms of the vectors, and the output cosine similarity value is between -1 and 1. The closer it is to 1, the more similar the two vectors are.
Citation Information
Patent Citations
Defect detection system and method utilizing template comparison based on twin neural network
CN111179251A
Sample fracture automatic identification and shearing area percentage calculation method
CN116363191A
Product quality testing device based on image processing
CN202453297U
Charpy impact sample V-shaped gap size measuring device
CN215572577U
Device for measuring width of impact notched ligament of Charpy impact sample
CN219348444U