Visual detection method and device suitable for steel wire thread insert and storage medium
Through visual inspection methods and neural network models, the problems of low accuracy and efficiency in manual visual inspection of wire thread inserts were solved, and efficient and accurate quality inspection was achieved.
Patent Information
- Application Number
- CN202510746650.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-12
AI Technical Summary
In the existing technology, the quality inspection of wire thread inserts relies on manual visual inspection, which has problems of low accuracy and efficiency and is difficult to meet the inspection needs of large-scale production.
Visual inspection methods are adopted to realize multi-angle image acquisition and analysis of wire thread inserts through visual inspection devices and neural network models. Combined with preset thresholds and acceptance rules, a standardized inspection process is established to identify appearance defects and dimensional deviations.
The accuracy and consistency of wire thread insert detection results are achieved, detection efficiency is improved, subjective errors and missed detections in manual detection are avoided, and the method is suitable for large-scale production.
Smart Images

Figure CN120635023A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of visual inspection technology, and in particular to a visual inspection method, device and storage medium suitable for wire thread inserts. Background Art
[0002] Wire thread inserts are helical spring coils made of steel wire and used as internal thread fasteners. Installed in threaded holes in low-strength materials such as aluminum and magnesium alloys, they increase the strength of the originally weak threads to near that of steel, preventing connection failures caused by thread slippage or breakage. In threaded connections that are frequently disassembled, wire thread inserts act as a "protective layer," reducing wear on the base threads and extending component life. The high-precision internal threads ensure a tighter and more stable fit between the bolt and the insert, improving assembly accuracy. Wire thread inserts are widely used in aerospace, automotive, electronic equipment, medical devices, and other fields. For example, in aircraft engines, wings, and fuselage structures, wire thread inserts are used to ensure high reliability and fatigue resistance in the threaded connections of key components, meeting the dual requirements of lightweighting and high strength in the aerospace field. They are used in engine blocks, gearboxes, suspension systems, and other components to improve the durability and vibration resistance of threaded connections and ensure stable vehicle operation.
[0003] However, quality inspection for wire thread inserts currently faces numerous challenges. Traditional inspection methods rely primarily on manual visual inspection, where inspectors visually check to see if the wire thread inserts meet standards. This approach has significant limitations: First, manual inspection is significantly influenced by subjective factors, and the experience and judgment criteria of different inspectors vary, making it difficult to ensure the consistency and accuracy of test results. For example, defects such as tiny surface cracks and slight deviations in pitch can easily be missed during manual inspection. Second, manual inspection is inefficient, making it difficult to meet production cycle requirements in large-scale production. Long hours of inspection work can also cause visual fatigue in inspectors, further reducing the accuracy and efficiency of inspections. Summary of the Invention
[0004] In view of this, the present application provides a visual inspection method, device and storage medium suitable for wire thread inserts to solve the technical problems of low accuracy and efficiency of manual visual inspection of wire thread inserts in the prior art.
[0005] In a first aspect, the present application provides a visual inspection method suitable for wire thread inserts, comprising:
[0006] vertically placing the wire screw insert to be tested on a carrier, acquiring a first top view of the wire screw insert to be tested, and determining whether the wire screw insert to be tested has a mounting handle based on the first top view; if no mounting handle is provided, determining that the wire screw insert to be tested is unqualified;
[0007] Otherwise, determining whether the mounting handle is located in the upper position; if not, vertically flipping the wire screw insert to be inspected by 180° to acquire a second top view of the wire screw insert to be inspected;
[0008] Based on the top view of the installation handle in the upper position, it is identified whether there is a broken groove corresponding to the installation handle. If there is no broken groove, it is determined that the wire screw insert to be tested is unqualified.
[0009] Preferably, if the broken groove is present, the inner diameter and outer diameter of the wire screw insert to be tested are calculated based on a top view with the mounting handle located at a lower position, and a preset threshold is used to determine whether the inner diameter and outer diameter of the wire screw insert to be tested are qualified;
[0010] If it is determined that either the inner diameter or the outer diameter is unqualified or both the inner diameter and the outer diameter are unqualified, the wire thread insert to be tested is determined to be unqualified;
[0011] Otherwise, based on the top view with the mounting handle located at the bottom, identifying whether the wire screw insert body to be inspected has concave-convex deformation;
[0012] If the main body of the wire screw insert to be tested has concave-convex deformation, the wire screw insert to be tested is determined to be unqualified.
[0013] Preferably, if the main body of the wire screw insert to be detected has no concave-convex deformation, a horizontal view of the wire screw insert to be detected is collected;
[0014] Calculating the number of turns of the main body of the wire screw insert to be detected and the axial length of the main body of the wire screw insert to be detected based on the horizontal view of the wire screw insert to be detected;
[0015] Determine whether the number of turns of the wire screw insert to be tested is consistent with a preset target number of turns, and if not, determine that the wire screw insert to be tested is unqualified;
[0016] If they are consistent, it is determined whether the axial length of the main body of the wire screw insert to be tested is within a preset axial length threshold range; if not, it is determined that the wire screw insert to be tested is unqualified;
[0017] If it is within the preset axial length threshold range, the turn distance between each layer of the wire screw insert to be tested is calculated, and it is determined whether each turn distance is within the preset turn distance error threshold range. If any turn distance is not within the preset turn distance error threshold range, the wire screw insert to be tested is determined to be unqualified.
[0018] Preferably, if all the turn distances are within a preset turn distance error threshold range, each horizontal view of the wire screw insert to be detected is collected to obtain a set of horizontal views of the wire screw insert to be detected; wherein the carrier is a rotating carrier, and the rotation of the rotating carrier drives the wire screw insert to be detected to rotate, so as to collect each horizontal view of the wire screw insert to be detected; wherein the frame rate of collecting the horizontal views is adapted to the rotation frequency of the rotating carrier;
[0019] Based on the set of horizontal views of the wire thread insert to be inspected, identifying appearance defects on the outer wall surface of the wire thread insert to be inspected through the trained neural network model;
[0020] Based on the identified appearance defects combined with the preset acceptance rules, it is determined whether the appearance defects on the outer wall of the wire screw insert to be inspected are acceptable. If the appearance defects on the outer wall of the wire screw insert to be inspected are not acceptable, the wire screw insert to be inspected is determined to be unqualified.
[0021] Preferably, if all the turn distances are within a preset turn distance error threshold range, each axonometric top view of the wire screw insert to be detected is collected to obtain a set of axonometric top views of the wire screw insert to be detected; wherein, when collecting the axonometric top views, the mounting handle is located in a lower position, and the frame rate of collecting the axonometric top views is adapted to the rotation frequency of the rotating stage;
[0022] Based on the set of isometric top views of the wire thread insert to be inspected, the appearance defects of the inner wall surface of the wire thread insert to be inspected are identified by using a trained neural network model;
[0023] Based on the identified appearance defects and the preset acceptance rules, it is determined whether the appearance defects of the inner wall surface of the wire screw insert to be tested are acceptable; if the appearance defects of the inner wall surface of the wire screw insert to be tested are not acceptable, the wire screw insert to be tested is determined to be unqualified;
[0024] If the appearance defects of the outer wall surface of the wire screw insert to be tested are acceptable, and the appearance defects of the inner wall surface of the wire screw insert to be tested are acceptable, the wire screw insert to be tested is determined to be qualified.
[0025] Preferably, the identifying the appearance defects of the outer wall surface of the wire screw insert to be detected by the trained neural network model based on the horizontal view set of the wire screw insert to be detected includes:
[0026] Based on the trained neural network model, combined with the rotation frequency of the rotating stage and the frame rate of the horizontal view acquisition, the corresponding ROI target area is segmented from each horizontal view to obtain a set of ROI target area images;
[0027] All images in the target area image set are fused and spliced to obtain a panoramic view of the outer wall of the wire screw sleeve to be inspected;
[0028] Based on the panoramic view of the outer wall surface of the wire screw insert to be inspected, defect recognition is performed using the trained defect recognition model to obtain the appearance defects of the outer wall surface of the wire screw insert to be inspected.
[0029] Preferably, the visual inspection method for wire thread inserts further comprises:
[0030] Determining a target horizontal view from the set of horizontal views of the wire screw insert to be inspected, calculating the depth of the broken groove based on the target horizontal view, and judging whether it is within a preset depth threshold range, and if not, judging that the wire screw insert to be inspected is unqualified;
[0031] Based on a top view with the mounting handle located at a lower position, identifying whether there is a burr defect at the end of the wire screw insert to be tested, and if a burr defect is present, determining that the wire screw insert to be tested is unqualified;
[0032] Based on the top view of the installation handle in the upper position, the length of the installation handle is calculated, and it is determined whether it is within the preset installation handle length threshold range. If it is not within the installation handle length threshold range, the wire screw insert to be tested is determined to be unqualified.
[0033] In a second aspect, the present application provides a visual inspection device suitable for wire thread inserts, the device comprising:
[0034] a mounting handle presence identification module for collecting a first top view of a wire screw insert to be tested that is vertically placed on a carrier, and determining whether the wire screw insert to be tested has a mounting handle based on the first top view; if no mounting handle is present, determining that the wire screw insert to be tested is unqualified;
[0035] a broken groove acquisition module, for determining whether the installation handle is located in an upper position when the installation handle is present, and if not, vertically flipping the wire screw insert to be inspected 180 degrees to acquire a second top view of the wire screw insert to be inspected;
[0036] The module for identifying the presence or absence of a broken groove is used to identify whether there is a broken groove corresponding to the installation handle based on a top view of the installation handle located at an upper position. If there is no broken groove, the wire screw sleeve to be tested is determined to be unqualified.
[0037] In a third aspect, the present application provides a computer device comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor implements the visual inspection method for wire thread inserts described in the first aspect by executing the computer instructions.
[0038] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions. When the computer instructions are executed by a processor, the visual inspection method for wire thread inserts described in the first aspect is implemented.
[0039] The visual inspection method, device, and storage medium for wire thread inserts provided in this application have at least the following beneficial effects:
[0040] The technical solution provided by this application can establish a repeatable and traceable standardized testing process by breaking down the testing steps into a three-level logical closed loop of "determination of the existence of the mounting handle - position adjustment - detection of the broken groove". This unifies the testing standards for wire screw inserts and ensures the accuracy and consistency of the wire screw insert test results. Compared with manual visual inspection, it improves the detection efficiency while avoiding omissions caused by negligent judgment of the operator. It can effectively solve the technical problems of low accuracy and efficiency of manual visual inspection of wire screw inserts in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. It should be noted that the drawings described below are schematic and should not be understood as limiting the present application in any way. In the drawings:
[0042] Figure 1 A schematic diagram of a visual inspection method for wire thread inserts in one embodiment of the present application is shown;
[0043] Figure 2 A schematic flow chart of a visual inspection method for wire thread inserts in one embodiment of the present application is shown;
[0044] Figure 3 A schematic diagram of a wire screw insert is shown;
[0045] Figure 4 A schematic diagram of a visual inspection device for a wire thread insert in one embodiment of the present application is shown;
[0046] Figure 5 A schematic diagram of a computer device in one embodiment of the present application is shown. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application. The technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.
[0048] Although the processes described below include multiple operations that appear in a specific order, it should be clearly understood that these processes may also include more or fewer operations, and these operations may be performed sequentially or in parallel.
[0049] Example 1
[0050] The present application provides a visual inspection method for wire thread inserts, based on a visual inspection device for wire thread inserts, which includes:
[0051] The carrier is used to support the vertical placement of the wire screw insert. The carrier has a horizontal rotation function and is used to rotate the wire screw insert.
[0052] A high-precision robotic arm is used to grab the wire screw insert to be tested and place it vertically on the target position of the carrier. The end of the robotic arm is equipped with a rotation module to grab the wire screw insert, rotate it 180 degrees, and then place it on the target position of the carrier. In actual applications, the robotic arm is generally installed on one side of the wire screw insert conveyor belt to grab the wire screw insert to be tested on the conveyor belt and place it on the carrier. After the test is completed, the robotic arm is also used to put the qualified wire screw insert back on the conveyor belt and place the unqualified wire screw insert in the unqualified material unloading area.
[0053] Vision inspection system, including:
[0054] An industrial camera with a top-down perspective is vertically arranged above the stage and is matched with a light source corresponding to the industrial camera with a top-down perspective to capture a top view of the wire screw insert;
[0055] An industrial camera with a horizontal viewing angle is horizontally set above the carrier, and is paired with a light source corresponding to the industrial camera with a horizontal viewing angle, and is used to capture the horizontal view of the wire screw sleeve, that is, to capture the outer wall image of the wire screw sleeve. It should be noted that in actual applications, in order to save equipment costs, a single camera is preferably used, which is fixed and continuously captures various horizontal views of the wire screw sleeve during the self-rotation of the wire screw sleeve. Of course, two or more cameras can also be set to capture at the same time to reduce the capture time of the horizontal view of the wire screw sleeve and improve CT recognition. This application is mainly explained with a single camera solution, and the industrial camera with an axonometric top view below is also preferably explained with a single camera solution, which will not be elaborated on.
[0056] An industrial camera with an axonometric top-down perspective is tilted and arranged above the carrier side, and is matched with a light source corresponding to the industrial camera with an axonometric top-down perspective to capture the axonometric top-down view of the wire screw insert, that is, to capture the inner wall image of the wire screw insert; in actual applications, the industrial camera with an axonometric top-down perspective is installed on a bracket that can be adjusted to the corresponding angle to meet the detection needs of wire screw inserts of different specifications.
[0057] See also Figure 1 , an embodiment of the present application provides a visual inspection method for wire thread inserts, which may include the following steps.
[0058] S101, vertically placing the wire screw insert to be tested on a carrier, collecting a first top view of the wire screw insert to be tested, and determining whether the wire screw insert to be tested has a mounting handle based on the first top view; if not, determining that the wire screw insert to be tested is unqualified;
[0059] S102: Otherwise, determine whether the mounting handle is in the upper position. If not, vertically flip the wire screw insert to be tested 180° to capture a second top view of the wire screw insert to be tested.
[0060] S103. Based on the top view of the installation handle at an upper position, identify whether there is a break groove corresponding to the installation handle. If there is no break groove, determine that the wire screw insert to be tested is unqualified.
[0061] See also Figure 2 Specifically, in this embodiment, a robotic arm vertically places the wire screw insert to be inspected on a carrier, and an industrial camera with a top-down perspective captures a first top view of the wire screw insert to be inspected. The presence of a mounting handle can be identified by determining whether the mounting handle feature can be automatically extracted from the image through feature recognition, or by determining whether both the outer circle and the complete inner circle contour can be extracted simultaneously. If both can be extracted, the mounting handle is absent; otherwise, the mounting handle is present. If the mounting handle is absent, the wire screw insert to be inspected is deemed unqualified.
[0062] Please continue reading Figure 2 When the wire screw insert is identified to have a mounting handle, the mounting handle can be judged to be in the upper or lower position by identifying whether the mounting handle is connected to the wire screw insert body. If the mounting handle is connected to the wire screw insert body, the mounting handle is in the upper position; if the mounting handle is not connected to the wire screw insert body, the mounting handle is in the lower position. Figure 3 As shown, the wire screw sleeve mounting handle on the right is connected to the main body.
[0063] The presence or absence of a broken groove can be determined by feature recognition to determine whether the broken groove feature in the image can be automatically extracted. If the broken groove cannot be identified, the wire screw insert to be tested is determined to be unqualified.
[0064] In this implementation, a robotic arm, a top-down industrial camera, and image processing are integrated to break down the inspection process into a three-step logical closed loop: "mounting handle presence determination - position adjustment - break groove detection." This establishes a repeatable, traceable, and standardized inspection process. This standardizes wire thread insert inspection standards and ensures the accuracy and consistency of wire thread insert inspection results. Compared to manual visual inspection, this improves inspection efficiency while preventing omissions due to operator inadvertent misjudgment.
[0065] Preferably, if there is a broken groove, the inner diameter and outer diameter of the wire screw insert to be tested are calculated based on the top view with the mounting handle located at the lower position, and the inner diameter and outer diameter of the wire screw insert to be tested are determined to be qualified in combination with a preset threshold value;
[0066] If any one of the inner diameter and the outer diameter is judged to be unqualified or both the inner diameter and the outer diameter are judged to be unqualified, the wire thread insert to be tested is judged to be unqualified;
[0067] Otherwise, based on the top view with the mounting handle at the bottom, identify whether the wire screw insert body to be inspected has concave-convex deformation;
[0068] If the main body of the wire screw insert to be tested has concave-convex deformation, the wire screw insert to be tested is judged to be unqualified.
[0069] Please continue reading Figure 2 Specifically, in this embodiment, before calculating the inner diameter and outer diameter of the wire screw insert body to be inspected based on the top view with the mounting handle in the lower position, it is also necessary to identify whether there is a top view with the mounting handle in the lower position. In simple terms, it is to determine whether the industrial camera with a top view has captured two images of the material to be inspected, that is, whether the wire screw insert has been flipped before determining whether there is a broken groove. If not, the wire screw insert needs to be flipped and the top view needs to be recaptured.
[0070] Specifically, in this embodiment, in actual application, the Canny edge detection algorithm can be used to extract the inner and outer contours, and the inner and outer diameter contour circles can be fitted through Hough circle transform to calculate the center coordinates and diameter values. Inner diameter (D1): the diameter value of the fitted inner contour circle; outer diameter (D2): the diameter value of the fitted outer contour circle. The average value of multiple measurements can be taken to avoid the influence of edge burrs, and the roundness error can be recorded synchronously to improve the accuracy of the calculation results. The target inner diameter / outer diameter standard value (D1 standard, D2 standard) and tolerance range (±ΔD1, ±ΔD2) in the preset wire screw insert specification database are called.
[0071] If D 1标准 -ΔD1≤D1≤D 1标准 +ΔD1, the inner diameter size is qualified;
[0072] If D 2标准 -ΔD2≤D2≤D 2标准 +ΔD2, the outer diameter dimension is qualified.
[0073] In this embodiment, the image is denoised by Gaussian filtering (kernel size 3×3), the main area of the screw sleeve is extracted by threshold segmentation, and the thread gap is filled by morphological operation (closing operation) to generate a smooth main body contour mask. The standard contour template of the corresponding model is called, and the ideal contour curve generated based on the CAD design drawing is used. The measured contour is aligned with the standard template by affine transformation using the Procrustes analysis algorithm, and the radial deviation value δ of each contour point is calculated. i , the calculation formula is as follows:
[0074] δ i = d标准∣Pi-Pi标准∣ ×100%
[0075] Among them, P i is the measured contour point coordinate, P i标准 is the coordinate of the corresponding point of the standard contour, d 标准 is the average diameter of the standard profile.
[0076] If there exists any contour point δ i >+K% (K is the positive deviation threshold, such as 1.5%), it is judged as a local bulge;
[0077] If there exists any contour point δ i <-K% (K is the negative deviation threshold, such as 1.0%), it is determined as a local depression.
[0078] If the main body of the wire screw insert to be tested has concave-convex deformation, the wire screw insert to be tested is judged to be unqualified.
[0079] In this embodiment, the detection process covers the inner diameter, outer diameter size and concave-convex deformation detection. By combining the preset threshold and multi-dimensional detection standards, it can accurately identify various problems such as dimensional deviation and appearance defects, avoid the flow of unqualified products into the market, ensure the reliability and stability of wire screw inserts in threaded connections, and improve the overall quality of the product. Based on image recognition and algorithm calculation, automated detection can be achieved. Compared with manual detection, it greatly reduces detection time, reduces labor costs, and improves production efficiency. It is especially suitable for the rapid quality inspection needs in large-scale production scenarios and effectively meets the production rhythm requirements. A step-by-step, clear and definite judgment logic is adopted, from preliminary size screening to deformation depth detection, to avoid misjudgment and missed judgment caused by a single detection dimension, ensure that the detection results of each wire screw insert are true and reliable, and provide a solid basis for product quality control. The preset threshold and detection parameters can be flexibly adjusted according to the standard requirements of wire screw inserts of different specifications to adapt to diverse production needs. It has strong versatility and scalability and can meet the quality inspection needs of multiple models of products. Through strict testing procedures, we can effectively reduce after-sales repairs, returns and exchanges caused by product quality issues, thereby reducing after-sales costs.
[0080] Preferably, if the main body of the wire screw insert to be inspected has no concave-convex deformation, a horizontal view of the wire screw insert to be inspected is collected;
[0081] Calculating the number of turns of the main body of the wire thread insert to be tested and the axial length of the main body of the wire thread insert to be tested based on the horizontal view of the wire thread insert to be tested;
[0082] Determine whether the number of turns of the wire screw insert to be tested is consistent with the preset target number of turns. If not, the wire screw insert to be tested is determined to be unqualified;
[0083] If they are consistent, it is determined whether the axial length of the main body of the wire screw insert to be tested is within the preset axial length threshold range; if not, the wire screw insert to be tested is determined to be unqualified;
[0084] If it is within the preset axial length threshold range, the circle spacing between each layer of the wire screw insert to be tested is calculated, and it is determined whether each circle spacing is within the preset circle spacing error threshold range. If any circle spacing is not within the preset circle spacing error threshold range, the wire screw insert to be tested is judged to be unqualified.
[0085] In this embodiment, the horizontal view is binarized (Otsu threshold segmentation) to extract the screw sleeve contour; and the number of screw sleeve layers is counted along the axial line.
[0086] A pixel-to-physical size mapping relationship (e.g., 1 pixel = 0.02 mm) is established using a calibration plate (a standard part with known dimensions). The axial pixel distance between the two end faces of the screw sleeve is detected and converted into the actual length L.
[0087] Calculation formula: L = Dp × K
[0088] Where L is the actual axial length of the wire screw insert to be inspected; Dp is the axial pixel distance between the two end faces of the insert in the horizontal view (unit: pixel); and K is the pixel-physical dimension calibration factor (unit: mm / pixel), which is obtained by pre-calibration using a calibration plate (a standard part with known precise dimensions). For example, if 10 mm on the calibration plate corresponds to 500 pixels, then K = 10 mm / 500 pixels = 0.02 mm / pixel.
[0089] The formula for calculating the distance between each coil of the wire thread insert to be tested is as follows:
[0090] ΔL i =ΔD (i+1-i) ×K
[0091] Where, ΔL i : The actual distance between the i-th layer and the i+1-th layer of the wire thread insert to be tested; ΔD (i+1-i) The axial pixel distance between the i-th layer and the i+1-th layer of the wire thread insert body to be inspected in the horizontal view.
[0092] In this embodiment, the structural accuracy of the wire screw insert is deeply detected by testing the number of turns, axial length, and pitch. The number of turns directly affects the integrity and load-bearing capacity of the thread engagement, the axial length is related to the fit of the insert within the mounting hole, and pitch errors can lead to difficulty in screwing in or loose connections. By accurately testing these parameters, assembly and use problems caused by structural dimensional deviations can be effectively avoided, ensuring the stability and reliability of the wire screw insert under various working conditions. Strictly comparing the preset target number of turns, axial length threshold, and pitch error range can ensure that the produced wire screw inserts meet uniform specifications. This not only facilitates internal production management and quality control, but also enables standardized product delivery within the supply chain, reducing communication costs and adaptation risks caused by inconsistent specifications, and enhancing market competitiveness. Through multi-dimensional parameter testing, subtle structural defects can be promptly detected during the production process. For example, problems such as missing turns, excessive axial length, or uneven pitch can be quickly located before the product enters the next production link, preventing the accumulation and spread of defective products, reducing rework costs and resource waste, and improving overall production efficiency. Combined with the previous dimensional and deformation testing, a complete testing system covering the appearance, size, and structural parameters of wire thread inserts has been formed. This comprehensive testing method complements and cross-validates each other, greatly reducing the possibility of missed detection and misjudgment, providing a more solid guarantee for product quality and ensuring that every product delivered meets strict quality requirements. The preset parameter thresholds can be flexibly adjusted according to the different models and specifications of wire thread inserts, making the testing method applicable to the production scenarios of various products. Whether it is small-batch customized production or large-scale standardized production, efficient and accurate quality testing can be achieved by quickly configuring the testing parameters, thereby improving the flexibility and adaptability of product production and product testing.
[0093] Preferably, if all the turn distances are within a preset turn distance error threshold range, each horizontal view of the wire screw insert to be detected is collected to obtain a set of horizontal views of the wire screw insert to be detected; wherein the carrier is a rotating carrier, and the rotating carrier rotates to drive the wire screw insert to be detected to rotate, so as to collect each horizontal view of the wire screw insert to be detected; wherein the frame rate of collecting the horizontal views is adapted to the rotation frequency of the rotating carrier;
[0094] Based on the horizontal view set of the wire thread insert to be inspected, the trained neural network model is used to identify the appearance defects on the outer wall of the wire thread insert to be inspected;
[0095] Based on the identified appearance defects and the preset acceptance rules, it is determined whether the appearance defects of the outer wall of the wire screw sleeve to be tested are acceptable. If the appearance defects of the outer wall of the wire screw sleeve to be tested are not acceptable, the wire screw sleeve to be tested is judged to be unqualified.
[0096] In this embodiment, the rotating stage drives the wire screw to be inspected to rotate at a constant speed, and the industrial camera shoots at a frame rate that matches the rotation frequency (such as collecting one image every 20° rotation) to obtain a complete set of horizontal views (usually containing 18 images). Using a pre-trained convolutional neural network (CNN) model (such as ResNet-50), the model has been trained through more than 100,000 images of wire screws marked with defects such as scratches, depressions, and oxidation, with a recognition accuracy of ≥98%. The horizontal view set is input into the trained neural network model, and the model automatically identifies the type of appearance defects (such as scratch length, depression depth, etc.) and position on the outer wall of the wire screw to be inspected. The identified appearance defects are compared with the preset acceptance rules. For example, the preset rule stipulates that "scratches with a length greater than 1mm are not acceptable". If a defect that meets this condition is detected, the wire screw to be inspected is judged to be unqualified; if all appearance defects meet the acceptance rules, the wire screw to be inspected is judged to be qualified. For example, if the area of the oxidation area is greater than 5% of the total area of the outer wall of the screw, it is not accepted.
[0097] In this embodiment, the wire screw sleeve to be inspected is driven to rotate automatically by the rotating stage, and the horizontal view is captured at a frame rate adapted to the rotation frequency, so that image information of the wire screw sleeve at various angles can be obtained quickly and comprehensively. Compared with manual observation and inspection one by one, the inspection time is greatly shortened, batch and automated inspection is realized, and production inspection efficiency is greatly improved.
[0098] With the help of the trained neural network model, the appearance defects of the horizontal view set are identified, avoiding the problems of visual fatigue and subjective judgment errors that may occur in manual inspection. It can accurately identify small or complex appearance defects on the outer wall of the wire screw sleeve, effectively improving the accuracy and reliability of the inspection results.
[0099] Identified appearance defects are judged based on preset acceptance rules, eliminating inconsistent standards among different inspectors and ensuring that every wire thread insert to be inspected is judged according to the same strict standards, ensuring consistent and standardized test results. Excellent compatibility with wire thread inserts of varying specifications and models eliminates the need to design complex testing solutions for each product, reducing the development and operation costs of the inspection system. Timely and accurate identification of substandard products effectively prevents wire thread inserts with appearance defects from entering the next process or entering the market, reducing after-sales risks caused by product quality issues.
[0100] Preferably, based on the set of horizontal views of the wire thread insert to be inspected, identifying the appearance defects of the outer wall surface of the wire thread insert to be inspected by the trained neural network model includes:
[0101] Based on the trained neural network model, combined with the rotation frequency of the rotating stage and the frame rate of the horizontal view acquisition, the corresponding ROI target area is segmented from each horizontal view to obtain a set of ROI target area images;
[0102] All images in the target area image set are fused and spliced to obtain a panoramic view of the outer wall of the wire screw sleeve to be inspected;
[0103] Based on the panoramic view of the outer wall of the wire screw insert to be inspected, defect recognition is performed through the trained defect recognition model to obtain the appearance defects of the outer wall of the wire screw insert to be inspected.
[0104] In this embodiment, based on the trained neural network model, combined with the rotation frequency of the rotating stage and the frame rate of the horizontal view acquisition, the corresponding ROI (region of interest) target area is segmented from each horizontal view, thereby obtaining a set of ROI target area images. By training on a large number of horizontal views of wire screw inserts with annotated ROI areas, the neural network model can accurately locate the key areas corresponding to the actual structure of the wire screw insert.
[0105] All images in the ROI target area image set are fused and spliced. By matching the feature points between images and using weighted fusion, fade-in and fade-out algorithms, the image splicing gaps are eliminated to obtain a panoramic view of the outer wall of the wire screw sleeve to be inspected.
[0106] Based on a panoramic view of the outer wall of the wire screw insert to be inspected, defect recognition is performed using a trained defect recognition model. This defect recognition model, based on a deep learning algorithm and trained on a large number of wire screw insert images containing different defect types, can accurately identify various surface defects such as cracks, scratches, and deformations on the outer wall, ultimately identifying the surface defects of the wire screw insert to be inspected.
[0107] In this embodiment, the ROI target area is divided by combining the rotation frequency and frame rate of the rotating stage to ensure that each area can accurately correspond to the actual position of the wire screw sleeve, avoid image redundancy or omission of key information, avoid interference from non-critical areas, greatly improve the efficiency of image effective information extraction, focus subsequent detection on the core parts, reduce redundant data processing, and improve overall detection speed and accuracy; the panoramic view obtained by image fusion and splicing fully presents the outer wall surface of the wire screw sleeve, providing a more comprehensive and clear image basis for subsequent defect identification, further improving the accuracy and completeness of defect identification. Fusion and splicing of the ROI target area image set can convert scattered local images into a complete panoramic view of the outer wall surface, seamlessly restoring the full picture of the wire screw sleeve. Compared with traditional single-view or local detection, the detection coverage rate can be increased to 100%, eliminating the problem of missed detection due to lack of view angle, and greatly enhancing the detection integrity. Based on panoramic views, inspection is performed through professionally trained defect recognition models. Since panoramic views provide richer and continuous defect features, they can identify tiny defects that cannot be identified by a single image. Compared with conventional inspection methods, the accuracy of complex defect recognition is further improved, and various types of appearance defects such as cracks and scratches can be accurately captured. ROI target area segmentation effectively reduces the amount of image data to be processed. Combined with an efficient fusion stitching algorithm, compared with directly processing a large number of horizontal views, data processing time is reduced, and the hardware computing burden is reduced. While ensuring inspection accuracy, the overall inspection efficiency is further improved to achieve rapid inspection. The processing logic of the ROI segmentation and panoramic stitching does not rely on the size and shape of the wire screw sleeve of a specific specification. It can adapt to the inspection of different types of products by simply adjusting the rotation frequency and frame rate of the rotating stage and the model training data. There is no need to develop a separate inspection program for each specification, which reduces the system development cost and maintenance difficulty and improves versatility.
[0108] It should be noted that the following "based on the set of axonometric top views of the wire screw insert to be inspected, through the trained neural network model, identifying the appearance defects of the inner wall surface of the wire screw insert to be inspected" can also be achieved in the same way. However, the axonometric top view needs to be perspective transformed and corrected to the ROI target area image of the front view, which will not be elaborated here.
[0109] Preferably, if all the turn distances are within a preset turn distance error threshold range, each axonometric top view of the wire screw insert to be tested is collected to obtain a set of axonometric top views of the wire screw insert to be tested; wherein, when collecting the axonometric top views, the mounting handle is located at a lower position, and the frame rate of collecting the axonometric top views is adapted to the rotation frequency of the rotating stage;
[0110] Based on a set of isometric top views of the wire thread insert to be inspected, the trained neural network model is used to identify the appearance defects on the inner wall of the wire thread insert to be inspected.
[0111] Based on the identified appearance defects and the preset acceptance rules, it is determined whether the appearance defects of the inner wall of the wire screw insert to be tested are acceptable. If the appearance defects of the inner wall of the wire screw insert to be tested are not acceptable, the wire screw insert to be tested is determined to be unqualified;
[0112] If the appearance defects of the outer wall of the wire thread insert to be tested are acceptable, and the appearance defects of the inner wall of the wire thread insert to be tested are acceptable, the wire thread insert to be tested is judged to be qualified.
[0113] In this embodiment, when the appearance defects of the inner wall of the wire screw sleeve are to be detected, it is necessary to identify the ROI effective area of the inner wall of the wire screw sleeve and identify the appearance defects within the ROI effective area of the inner wall. The specific principle of identifying the appearance defects refers to the identification of the appearance defects of the outer wall, which will not be repeated here.
[0114] In this embodiment, when collecting the axonometric top view, the mounting handle is placed in the lower position so that the camera can acquire the inner wall image at the optimal angle, effectively reducing occlusion and reflection problems. Compared with the conventional top view angle, the visible area of the inner wall is increased, the imaging clarity of the key thread structure is improved, and the detection rate of inner wall defects is significantly improved.
[0115] In this embodiment, by simultaneously capturing an axonometric top view and a horizontal view, the inner and outer wall surfaces can be inspected separately, achieving a one-time inspection of all-dimensional appearance defects in the wire screw insert. Compared to traditional staged inspection methods, this improves inspection efficiency, shortens inspection time, and avoids positioning errors caused by multiple clamping. The combined judgment mechanism based on the inspection results of the inner and outer walls can comprehensively assess the overall quality of the wire screw insert, avoiding situations where a single surface inspection may pass but the overall performance may not meet the standards, reducing the false positive rate of unqualified products and further improving product quality before delivery.
[0116] Preferably, the visual inspection method for the wire thread insert further comprises: based on two top views of the wire thread insert, inspecting whether the first and last turns of the wire thread insert body have appearance defects.
[0117] Preferably, the visual inspection method for wire thread inserts further comprises:
[0118] Based on the top view with the mounting handle located at the lower position, it is identified whether there is a burr defect at the end of the wire screw insert to be inspected. If a burr defect is present, the wire screw insert to be inspected is determined to be unqualified.
[0119] Preferably, the visual inspection method for wire thread inserts further comprises:
[0120] Based on the top view of the installation handle in the upper position, the length of the installation handle is calculated, and it is determined whether it is within the preset installation handle length threshold range. If it is not within the installation handle length threshold range, the wire screw insert to be tested is determined to be unqualified.
[0121] Preferably, the visual inspection method for wire thread inserts further comprises:
[0122] A target horizontal view is determined from a set of horizontal views of the wire thread insert to be inspected, the depth of the broken groove is calculated based on the target horizontal view, and it is determined whether it is within a preset depth threshold range. If it is not within the depth threshold range, the wire thread insert to be inspected is determined to be unqualified.
[0123] In this embodiment, based on the identified appearance defects and preset acceptance rules, a determination is made as to whether the appearance defects of the inner wall, outer wall, first and last turns of the main body, the end of the main body, the mounting handle, and the breakaway groove of the wire screw insert to be tested are acceptable. If any unacceptable appearance defect exists, the wire screw insert to be tested is deemed unqualified; if all appearance defects are acceptable, the wire screw insert to be tested is deemed qualified.
[0124] In this embodiment, inspection covers key areas such as the inner and outer surfaces of the wire screw insert, the first and last turns of the main body, the end of the main body, the mounting handle, and the break groove. Compared to traditional inspection methods, this method increases inspection coverage to 100%, avoiding quality risks caused by missed inspections of certain areas and ensuring comprehensive product quality. Leveraging a trained neural network model and image processing algorithm, it is able to accurately identify minor defects, such as detectable cracks on the inner wall and scratches on the outer wall. The accuracy of detecting details such as burrs and the depth of the break groove is also significantly improved. Compared to manual inspection, the accuracy of defect recognition is greatly improved, effectively reducing false detections and missed detections. Through automated image acquisition and algorithm-based rapid analysis and processing, inspection efficiency is significantly improved compared to manual, item-by-item inspections, meeting the rapid inspection needs of large-scale production, effectively shortening product inspection cycles, and improving production efficiency. Automated inspection reduces reliance on manual labor and lowers labor costs. At the same time, comprehensive and accurate inspections can detect substandard products in advance, preventing them from entering subsequent processes and reducing costs such as rework and scrapping due to product quality issues. Judgment based on preset acceptance rules and algorithms eliminates subjective differences in manual inspection, ensuring that every wire thread insert is tested according to unified standards, resulting in highly consistent and comparable test results. By adjusting image acquisition parameters and neural network model training data, it can be applied to the inspection of wire thread inserts of different specifications and models, eliminating the need to develop separate inspection solutions for each product, reducing the development and maintenance costs of the inspection system and providing excellent versatility and scalability.
[0125] Example 2
[0126] This embodiment provides a visual inspection device for wire thread inserts, which is described by applying the visual inspection method for wire thread inserts provided in the above embodiment 1. Figure 4As shown, a visual inspection device for wire thread inserts provided in one embodiment of the present application may include the following multiple modules.
[0127] a mounting handle presence identification module for collecting a first top view of a wire screw insert to be tested that is vertically placed on a carrier, and determining whether the wire screw insert to be tested has a mounting handle based on the first top view; if no mounting handle is present, determining that the wire screw insert to be tested is unqualified;
[0128] a broken groove acquisition module, for determining whether the installation handle is located in an upper position when the installation handle is present, and if not, vertically flipping the wire screw insert to be inspected 180 degrees to acquire a second top view of the wire screw insert to be inspected;
[0129] The module for identifying the presence or absence of a broken groove is used to identify whether there is a broken groove corresponding to the installation handle based on a top view of the installation handle located at an upper position. If there is no broken groove, the wire screw sleeve to be tested is determined to be unqualified.
[0130] The visual inspection device for wire thread inserts provided in the embodiment of the present application can be applied to the visual inspection method for wire thread inserts provided in the above-mentioned embodiment 1. For relevant details, refer to the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.
[0131] It should be noted that: when the visual inspection device for wire thread inserts provided in the embodiments of the present application performs visual inspection of wire thread inserts, only the division of the above-mentioned functional modules / functional units is used as an example. In actual applications, the above-mentioned functional distribution can be completed by different functional modules / functional units as needed, that is, the internal structure of the visual inspection device for wire thread inserts is divided into different functional modules / functional units to complete all or part of the functions described above. In addition, the implementation method of the visual inspection method for wire thread inserts provided in the above-mentioned method embodiment 1 and the implementation method of the visual inspection device for wire thread inserts provided in this embodiment 2 belong to the same concept. The specific implementation process of the visual inspection device for wire thread inserts provided in this embodiment 2 is detailed in the above-mentioned method embodiment 1 and will not be repeated here.
[0132] Example 3
[0133] See also Figure 5 As shown, one embodiment of the present application further provides a computer device, which can be a desktop computer, a laptop computer, a PDA, a cloud server, or other computer device. The computer device can include, but is not limited to, a processor and a memory. The processor and the memory can be connected via a bus or other means.
[0134] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as the program instructions / modules corresponding to the methods in the above-mentioned embodiments of this application. The processor executes the non-transitory software programs, instructions, and modules stored in the memory to perform various functional applications and data processing of the processor, that is, to implement the methods in the above-mentioned method embodiments.
[0135] One embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program. When the computer program is executed by a processor, the method in the above method embodiment is implemented.
[0136] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0137] Although the embodiments of the present application are described in conjunction with the accompanying drawings, this should not be construed as limiting the scope of the patent application. It should be noted that, for those skilled in the art, other variations or modifications may be made based on the above description without departing from the concept of the present application. It is not necessary and impossible to list all embodiments here. Obvious variations or modifications derived therefrom remain within the scope of protection created by the present application. Therefore, the scope of protection of the patent application shall be based on the appended claims.
Claims
1. A visual inspection method for wire thread inserts, characterized in that: The method comprises: vertically placing the wire screw insert to be tested on a carrier, acquiring a first top view of the wire screw insert to be tested, and determining whether the wire screw insert to be tested has a mounting handle based on the first top view; if no mounting handle is provided, determining that the wire screw insert to be tested is unqualified; Otherwise, determining whether the mounting handle is located in the upper position; if not, vertically flipping the wire screw insert to be inspected by 180° to acquire a second top view of the wire screw insert to be inspected; Based on the top view of the installation handle in the upper position, it is identified whether there is a broken groove corresponding to the installation handle. If there is no broken groove, it is determined that the wire screw insert to be tested is unqualified.
2. The visual inspection method for wire thread inserts according to claim 1, characterized in that: If the broken groove is present, the inner diameter and outer diameter of the wire screw insert to be tested are calculated based on a top view with the mounting handle located at a lower position, and a predetermined threshold is used to determine whether the inner diameter and outer diameter of the wire screw insert to be tested are qualified; If it is determined that either the inner diameter or the outer diameter is unqualified or both the inner diameter and the outer diameter are unqualified, the wire thread insert to be tested is determined to be unqualified; Otherwise, based on the top view with the mounting handle located at the bottom, identifying whether the wire screw insert body to be inspected has concave-convex deformation; If the main body of the wire screw insert to be tested has concave-convex deformation, the wire screw insert to be tested is determined to be unqualified.
3. The visual inspection method for wire thread inserts according to claim 2, characterized in that: If the main body of the wire screw insert to be tested has no concave-convex deformation, collecting a horizontal view of the wire screw insert to be tested; Calculating the number of turns of the main body of the wire screw insert to be detected and the axial length of the main body of the wire screw insert to be detected based on the horizontal view of the wire screw insert to be detected; Determine whether the number of turns of the wire screw insert to be tested is consistent with a preset target number of turns, and if not, determine that the wire screw insert to be tested is unqualified; If they are consistent, it is determined whether the axial length of the main body of the wire screw insert to be tested is within a preset axial length threshold range; if not, it is determined that the wire screw insert to be tested is unqualified; If it is within the preset axial length threshold range, the turn distance between each layer of the wire screw insert to be tested is calculated, and it is determined whether each turn distance is within the preset turn distance error threshold range. If any turn distance is not within the preset turn distance error threshold range, the wire screw insert to be tested is determined to be unqualified.
4. The visual inspection method for wire thread inserts according to claim 3, characterized in that: If all the turn distances are within the preset turn distance error threshold range, each horizontal view of the wire screw insert to be detected is collected to obtain a set of horizontal views of the wire screw insert to be detected; wherein the carrier is a rotating carrier, and the rotation of the rotating carrier drives the wire screw insert to be detected to rotate, so as to collect each horizontal view of the wire screw insert to be detected; wherein the frame rate of collecting the horizontal views is adapted to the rotation frequency of the rotating carrier; Based on the set of horizontal views of the wire thread insert to be inspected, identifying appearance defects on the outer wall surface of the wire thread insert to be inspected through the trained neural network model; Based on the identified appearance defects combined with the preset acceptance rules, it is determined whether the appearance defects on the outer wall of the wire screw insert to be inspected are acceptable. If the appearance defects on the outer wall of the wire screw insert to be inspected are not acceptable, the wire screw insert to be inspected is determined to be unqualified.
5. The visual inspection method for wire thread inserts according to claim 4, characterized in that: If all the turn distances are within the preset turn distance error threshold range, each axonometric top view of the wire screw insert to be tested is collected to obtain a set of axonometric top views of the wire screw insert to be tested; wherein, when collecting the axonometric top views, the mounting handle is located at a lower position, and a frame rate of collecting the axonometric top views is adapted to a rotation frequency of the rotating stage; Based on the set of isometric top views of the wire thread insert to be inspected, the appearance defects of the inner wall surface of the wire thread insert to be inspected are identified by using a trained neural network model; Based on the identified appearance defects and the preset acceptance rules, it is determined whether the appearance defects of the inner wall surface of the wire screw insert to be tested are acceptable; if the appearance defects of the inner wall surface of the wire screw insert to be tested are not acceptable, the wire screw insert to be tested is determined to be unqualified; If the appearance defects of the outer wall surface of the wire screw insert to be tested are acceptable, and the appearance defects of the inner wall surface of the wire screw insert to be tested are acceptable, the wire screw insert to be tested is determined to be qualified.
6. The visual inspection method for wire thread inserts according to claim 4, characterized in that: The identifying of the appearance defects of the outer wall of the wire screw insert to be detected by the trained neural network model based on the horizontal view set of the wire screw insert to be detected includes: Based on the trained neural network model, combined with the rotation frequency of the rotating stage and the frame rate of the horizontal view acquisition, the corresponding ROI target area is segmented from each horizontal view to obtain a set of ROI target area images; All images in the target area image set are fused and spliced to obtain a panoramic view of the outer wall of the wire screw sleeve to be inspected; Based on the panoramic view of the outer wall surface of the wire screw insert to be inspected, defect recognition is performed using the trained defect recognition model to obtain the appearance defects of the outer wall surface of the wire screw insert to be inspected.
7. The visual inspection method for wire thread inserts according to claim 6, characterized in that: Also includes: Determining a target horizontal view from the set of horizontal views of the wire screw insert to be inspected, calculating the depth of the broken groove based on the target horizontal view, and judging whether it is within a preset depth threshold range, and if not, judging that the wire screw insert to be inspected is unqualified; Based on a top view with the mounting handle located at a lower position, identifying whether there is a burr defect at the end of the wire screw insert to be tested, and if a burr defect is present, determining that the wire screw insert to be tested is unqualified; Based on the top view of the installation handle in the upper position, the length of the installation handle is calculated, and it is determined whether it is within the preset installation handle length threshold range. If it is not within the installation handle length threshold range, the wire screw insert to be tested is determined to be unqualified.
8. A visual inspection device suitable for wire thread inserts, characterized in that: The device comprises: a mounting handle presence identification module for collecting a first top view of a wire screw insert to be tested that is vertically placed on a carrier, and determining whether the wire screw insert to be tested has a mounting handle based on the first top view; if no mounting handle is present, determining that the wire screw insert to be tested is unqualified; a broken groove acquisition module, for determining whether the installation handle is located in an upper position when the installation handle is present, and if not, vertically flipping the wire screw insert to be inspected 180 degrees to acquire a second top view of the wire screw insert to be inspected; The module for identifying the presence or absence of a broken groove is used to identify whether there is a broken groove corresponding to the installation handle based on a top view of the installation handle located at an upper position. If there is no broken groove, the wire screw sleeve to be tested is determined to be unqualified.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor implements the visual inspection method for wire thread inserts as described in any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the visual inspection method for wire thread inserts according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Appearance detection method, system and equipment of power adapter and storage medium
CN121703104A
