360-degree full-view appearance detection method and system for scale marks of injector

Through prism imaging lighting and deep learning technology, combined with multi-printing and coverage detection branches, the problems of low efficiency and insufficient accuracy in syringe scale line detection have been solved, high-precision, low-cost automated detection has been achieved, and medical safety and production efficiency have been ensured.

CN120668659AActive Publication Date: 2025-09-19杭州映图智能科技有限公司

Patent Information

Application Number
CN202510720574.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-19
Estimated Expiration
2045-05-30

AI Technical Summary

Technical Problem

In existing technologies, syringe scale line detection is inefficient, manual inspection is prone to errors, and primary visual inspection equipment has redundant space and limited functions, and cannot accurately identify subtle defects, and cannot meet the quality control needs of modern large-scale production.

Method used

Prism imaging lighting technology is used to fold the reflected light from the four orthogonal fields of view around the syringe into the same imaging plane. Combined with the semantic segmentation network of deep learning and the multi-print and coverage detection branches, single-camera multi-screen synchronous acquisition is achieved. Defects are identified through the syringe appearance inspection model, and the detection accuracy is optimized through interference error verification and dynamic parameter correction.

Benefits of technology

It realizes defect recognition from millimeter level to 0.1mm level, improves detection accuracy and efficiency, reduces hardware and maintenance costs, and ensures medical safety and production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120668659A_ABST
    Figure CN120668659A_ABST
Patent Text Reader

Abstract

The invention relates to the field of production and detection of medical syringes, in particular to a 360-degree full-visual-angle appearance detection method and system for scale marks of syringes, and the method comprises the following steps: a prism imaging and lighting step: carrying out image reflection and lighting on a to-be-detected syringe; a data sampling processing step: acquiring and marking an image of the injector to be detected; and a to-be-detected defect identification step: constructing an injector appearance detection model, inputting the to-be-detected image into the injector appearance detection model, and detecting whether the appearance of the injector has defects, thereby solving the problems of low detection precision and low detection and production efficiency in the prior art, and achieving the beneficial effects of improving the detection precision and the production efficiency and enhancing the detection reliability. And the beneficial effect of reducing the maintenance cost is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of production inspection of medical syringes, and in particular to a method and system for inspecting the appearance of syringe graduations at a 360-degree full-viewing angle. Background Art

[0002] Manual visual inspection was a common inspection method in the early days, relying entirely on worker experience. In practice, its efficiency was extremely low, with an average inspection speed of less than 50 pieces per minute. Furthermore, long periods of repetitive work easily fatigued workers, leading to frequent missed inspections, with a miss rate as high as 5%-10%. More critically, manual visual inspection was unable to quantify defect size, making it difficult to accurately judge product quality and unable to meet the quality control requirements of modern large-scale production.

[0003] With technological advancements, rudimentary visual inspection equipment has begun to be applied to syringe scale line inspection. This type of equipment typically utilizes multiple cameras arranged in a circle. In disc-type automated equipment, this layout leads to significant installation space redundancy, making it difficult to properly install the equipment within the limited space. Furthermore, early rudimentary visual inspections used low-resolution cameras (e.g., 1.3 megapixels) coupled with simple threshold segmentation algorithms. These capabilities were very limited, capable only of identifying the presence of scale lines but unable to address minor defects such as line width overflow, underprinting, and overprinting. Even after initial inspection using this equipment, subsequent manual re-inspection is still required, increasing labor costs while failing to fundamentally address issues of inspection efficiency and accuracy.

[0004] Therefore, in order to solve the above problems, the present invention proposes a 360-degree full-viewing angle appearance inspection method and system for syringe graduation lines. Summary of the Invention

[0005] In view of the shortcomings of the prior art, the object of the present invention is to provide a method and system for 360-degree full-view appearance inspection of syringe scale lines.

[0006] To achieve the above object, the present invention provides the following technical solutions: A 360-degree full-view appearance inspection method for syringe scale lines comprises the following steps: a prism imaging and lighting step, folding the reflected light from four orthogonal fields of view around the syringe to be inspected into the same imaging plane of the sampling device through a prism module, and uniformly lighting the syringe to be inspected through a light source group; a data sampling and processing step, acquiring a four-dimensional field-of-view image of the syringe to be inspected by the sampling device, performing shape primitive decomposition and feature encoding on the four-dimensional field-of-view image using a stratified sampling strategy, classifying the four-dimensional field-of-view image according to the type of geometric units in the image and marking the image geometric type to obtain an image to be inspected; In the defect identification step, a syringe appearance detection model is constructed, the image to be inspected is input into the syringe appearance detection model, and the defect identification detection output is obtained after the model detection branch is matched according to the image geometry type, and the syringe appearance defect result is output based on the branch detection result. When all branch detection results are defect-free, the output syringe appearance defect result is qualified; otherwise, the output syringe appearance defect result is defective.

[0007] As a further improvement of the present invention, it also includes an interference error verification step, including selecting a syringe with a qualified appearance defect result and implanting a known defect into a syringe, and setting a rotation interference by periodically changing the syringe clamping angle and positioning accuracy through a disc machine control system. The syringe after setting the rotation interference is again subjected to real-time defect detection by a 360-degree full-view appearance detection system for the syringe scale line, and outputting a defect missed detection rate and a false alarm rate within the disturbance period according to the detection results. When the defect missed detection rate and the false alarm rate are higher than the preset corresponding thresholds, a correction instruction is output.

[0008] As a further improvement of the present invention, it also includes a dynamic parameter correction step. When a correction instruction is received, the generalization parameters of the syringe appearance inspection model for the rotational offset image are adjusted through incremental learning based on the defect omission rate, false alarm rate and known defect types within the disturbance period, and error compensation is performed on the geometric deformation of the image to be inspected based on the adjusted parameters.

[0009] As a further improvement of the present invention, the prism imaging and lighting step includes setting plane mirrors at an inclination angle of 45 degrees in the four directions of the syringe to form a dichroic prism matrix. The dichroic prism matrix reflects the four-directional field of view image of the syringe to the corresponding sensor area of ​​the sampling device, and folds the four-way light signal on the sampling device to form four spatially separated sub-images to form a four-directional field of view acquisition image.

[0010] As a further improvement of the present invention, the stratified sampling strategy includes defining a syringe scale line shape primitive library, wherein the shape primitive library includes: standard horizontal scale lines, standard vertical scale lines, font structure frames, defective dirty areas, and composite polygons; by inputting the four-way field of view acquisition image into a semantic segmentation network based on deep learning, extracting multi-scale features in the image through continuous downsampling and convolution in the encoder, and fusing the shallow detail features and deep semantic features of the image through jump connections, and setting output branches in the output layer according to the geometric unit types in the shape primitive library, and completing the classification of the four-way field of view acquisition image by calculating the probability that each pixel point in the four-way field of view acquisition image belongs to the geometric unit type in each output branch to obtain the image to be inspected.

[0011] As a further improvement of the present invention, the syringe appearance detection model constructs a multi-print detection branch and a coverage detection branch according to the geometric unit type of the image to be inspected through preset mapping rules. When the geometric unit type is a horizontal scale line or a vertical scale line, a multi-print detection branch is constructed based on the pixel spatial distribution of the geometric unit for defect detection through line length threshold comparison and spacing analysis; when the geometric unit type is a font structure frame, defect dirt or a composite polygon, a coverage detection branch is constructed based on the contour integrity of the geometric unit for defect detection through coverage calculation and fracture feature recognition; when any detection branch detects a defect, the syringe appearance detection model outputs the syringe appearance defect result as the presence of a defect.

[0012] As a further improvement of the present invention, the multi-print detection branch includes positioning the geometric units of the horizontal scale lines or the vertical scale lines, outputting the primitive bounding box and pixel coordinates, calculating the scale line pixel length based on the primitive bounding box and pixel coordinates, converting the actual length according to a preset physical size mapping relationship, comparing the actual length with a preset length threshold, and outputting the comparison result.

[0013] As a further improvement of the present invention, the coverage detection branch includes calibrating the pixel coordinates of the geometric units of the font structure frame, defect dirt or composite polygon, performing semantic segmentation, generating the corresponding mask area, extracting the mask contour through edge detection, calculating the effective pixel ratio in the mask area to obtain the coverage rate. If the coverage rate is lower than a preset threshold, it is determined that the coverage is incomplete. If a broken segment is detected in the mask contour and the length exceeds the preset threshold, it is determined to be a local missing defect, and the determination result is output.

[0014] A 360-degree full-view appearance inspection system for syringe graduations, comprising: A prism imaging and lighting module folds the reflected light from four orthogonal fields of view around the syringe to be inspected into the same imaging plane of the sampling device through a prism module, and evenly illuminates the syringe to be inspected through a light source group; a data sampling and processing module, which acquires a four-dimensional field-of-view image of the syringe to be inspected through the sampling device, performs shape primitive decomposition and feature encoding on the four-dimensional field-of-view image using a stratified sampling strategy, classifies the four-dimensional field-of-view image according to the type of geometric units in the image, and labels the image geometric type to obtain the image to be inspected; The defect recognition module to be inspected constructs a syringe appearance detection model, inputs the image to be inspected into the syringe appearance detection model, performs defect recognition detection output after the model detection branch is matched according to the image geometry type, and outputs the branch detection result, and outputs the syringe appearance defect result based on the branch detection result. When all branch detection results are defect-free, the output syringe appearance defect result is qualified; otherwise, the output syringe appearance defect result is defective.

[0015] As a further improvement of the present invention, the prism module includes five high-reflection plane lenses, which are arranged orthogonally at an angle of 45 degrees. The first lens reflects the light reflected from the 0-degree field of view directly to the corresponding sensor area of ​​the sampling device; the second lens reflects the light reflected from the 270-degree field of view directly to the corresponding sensor area; the third lens refracts the light reflected from the 90-degree field of view to the fourth lens, and the light enters the corresponding sensor area after secondary reflection; the fourth lens refracts the light reflected from the 180-degree field of view to the fifth lens, and the light enters the corresponding sensor area after secondary reflection.

[0016] The beneficial effects of the present invention are: (1) Improved detection accuracy, achieving a leap from millimeter-level to 0.1mm-level defect recognition, and can accurately detect scale line width overflow, underprinting, overprinting, and subtle defects in fonts and patterns. For example, in the detection of the standard horizontal scale line of a 1ml syringe, it can accurately determine whether its length is within the range of 2mm-2.2mm, and the error is controlled within an extremely small range. It can effectively avoid dosage errors caused by subtle scale line defects, providing a solid guarantee for medical safety.

[0017] (2) Improved production efficiency. By combining AI deep learning algorithms with disc machines and detection systems, automated printing of scale lines and intelligent AI recognition can be performed simultaneously. Real-time identification of scale line quality is performed during batch printing, eliminating the need to separate printing and detection processes. This significantly reduces downtime, improves production line space utilization, and significantly improves production efficiency.

[0018] (3) The detection cost is reduced. Through the prism module optical path folding technology, the multi-camera detection solution is optimized to a single-camera multi-screen synchronous acquisition. The number of cameras is reduced from 4 to 1, effectively reducing the hardware cost. Moreover, since the installation space is shortened by at least 2 times, it is suitable for high-density production line layouts such as disk machines, reducing the production space occupation cost. In addition, there is no need for multi-camera synchronous calibration, which reduces the maintenance complexity and further saves maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a flow chart of the method of the present invention; Figure 2 It is a system schematic diagram of the present invention; Figure 3 is a flow chart of the verification and correction steps of an embodiment of the present invention; Figure 4 is a schematic diagram of system defect detection according to an embodiment of the present invention; Figure 5 Schematic diagram of defects in an embodiment of the present invention. DETAILED DESCRIPTION

[0020] The present invention will be described in further detail below with reference to the accompanying drawings and embodiments. Identical components are denoted by the same reference numerals. It should be noted that the terms "front," "rear," "left," "right," "upper," and "lower" used in the following description refer to directions in the accompanying drawings, and the terms "bottom," "top," "inner," and "outer" refer to directions toward or away from the geometric center of a particular component, respectively.

[0021] A 360-degree full-view appearance inspection method for syringe scale lines, such as Figure 1 As shown, the following steps are included: a prism imaging and lighting step, folding the reflected light from four orthogonal fields of view around the syringe to be inspected into the same imaging plane of the sampling device through a prism module, and uniformly lighting the syringe to be inspected through a light source group; Specifically, such as Figures 2 to 4 As shown, the prism imaging and lighting step also includes setting plane mirrors at a 45-degree inclination angle in the four directions of the syringe to form a dichroic prism matrix. The dichroic prism matrix reflects the four-directional field of view image of the syringe to the corresponding sensor area of ​​the sampling device, and folds the four-way light signal on the sampling device to form four spatially separated sub-images to form a four-directional field of view acquisition image.

[0022] In actual production, using a traditional four-camera system to capture images of the four circumferences of the syringe under inspection requires a large equipment layout and faces the challenge of time-synchronized image acquisition. To address the installation space redundancy and mechanical interference issues faced by this traditional multi-camera synchronous inspection solution in disk-based automated equipment, a folded optical imaging method based on a prism module was employed, achieving an optimized inspection architecture with single-camera, multi-image synchronous acquisition. To meet the demands of high-speed production, the prism imaging lighting process was optimized. High-precision flat mirrors with a reflectivity of 99.5% and enhanced scratch resistance were precisely arranged at a 45-degree angle within the customized prism module. As the syringe under inspection rotates along the disk into the inspection area, a customized point light source illuminates vertically from below, its luminous surface precisely covering the diameter of the syringe body, providing basic illumination. Simultaneously, an angled ring light illuminates from the side at a 30-degree angle, optimizing fill lighting and ensuring uniform illumination of the syringe surface, minimizing shadows and overexposure. Light reflected from four orthogonal fields of view around the syringe enters the prism module. The reflected light with a 0-degree viewing angle passes directly through reflector M1 into sensor area A of the sampling device; the reflected light with a 270-degree viewing angle passes directly through reflector M2 into sensor area D; the reflected light with a 90-degree viewing angle is refracted sideways by reflector M3, then reflected twice by reflector M5 before entering sensor area B; and the reflected light with a 180-degree viewing angle is refracted sideways by reflector M4, then reflected twice by reflector M6 before entering sensor area C. After the four optical signals are folded, four spatially separated sub-images are formed on the same imaging plane of the sampling device, completing the folding and uniform illumination of the reflected light from the four-directional field of view. This provides a high-quality image foundation for subsequent detection, achieving the invention's goals of reducing installation space and improving detection accuracy.

[0023] a data sampling and processing step, acquiring a four-dimensional field-of-view image of the syringe to be inspected by the sampling device, performing shape primitive decomposition and feature encoding on the four-dimensional field-of-view image using a stratified sampling strategy, classifying the four-dimensional field-of-view image according to the type of geometric units in the image and marking the image geometric type to obtain an image to be inspected; In the data sampling and processing link, optimization is performed to address the situation where the syringe scale line style is frequently updated during the production process.

[0024] After the sampling device captures images of the syringe under inspection in four directions, it processes them based on a predefined library of scale line shape primitives. This library includes five basic geometric units: standard horizontal scale lines, standard vertical scale lines, font structure frames, defective and contaminated areas, and composite polygons.

[0025] The captured image is fed into a deep learning-based semantic segmentation network. In the encoder, multi-scale features are extracted from the image through successive downsampling and convolution operations. For example, the image is first downsampled by a factor of 2, using a 3×3 convolution kernel to extract preliminary features. It is then downsampled by a factor of 4, using a 5×5 convolution kernel to further extract more abstract features. Furthermore, skip connections are used to fuse shallow, detailed features with deep semantic features to ensure feature integrity.

[0026] At the output layer, five output branches are set up based on the geometric unit types in the shape primitive library. For each pixel, the probability of its belonging to the geometric unit type in each output branch is calculated, thereby completing the classification of the four-dimensional field of view image and labeling the image geometric type to obtain the image to be inspected. This method can more accurately process the image, meet the detection requirements of different scale line styles, and improve labeling efficiency and defect recognition accuracy.

[0027] Specifically, such as Figures 2 to 4 As shown, the stratified sampling strategy includes defining a syringe scale line shape primitive library, wherein the shape primitive library includes: standard horizontal scale lines, standard vertical scale lines, font structure frames, defective dirty areas, and composite polygons; by inputting the four-way field of view acquisition image into a semantic segmentation network based on deep learning, extracting multi-scale features in the image through continuous downsampling and convolution in the encoder, and fusing the shallow detail features and deep semantic features of the image through jump connections, and setting output branches in the output layer according to the geometric unit types in the shape primitive library, and completing the classification of the four-way field of view acquisition image by calculating the probability that each pixel point in the four-way field of view acquisition image belongs to the geometric unit type in each output branch to obtain the image to be inspected.

[0028] Standard horizontal scale lines are divided into precise length and width ranges based on different syringe specifications. For example, the standard horizontal scale line on a 1ml syringe is accurate to 2mm-2.2mm in length and 0.15mm-0.18mm in width; the standard horizontal scale line on a 5ml syringe is 3mm-3.3mm in length and 0.2mm-0.23mm in width. In addition to specifying the length and width range, the standard vertical scale lines also have a specified angle accuracy with the horizontal scale line, requiring it to be between 89.5 and 90.5 degrees. In terms of font structure frames, independent templates are created for different font styles, with clear standards for each character's outline, stroke thickness, and character spacing. For example, the Arial font "5" has a font structure frame height of 2mm, a width of 1.5mm, a stroke thickness of 0.2mm, and a uniform character spacing of 0.3mm.

[0029] For defective contamination areas, a detailed defect library is constructed based on common defect types from past production. For example, circular contamination caused by ink accumulation has a radius ranging from 0.1mm to 0.5mm. Scratch defects are categorized based on their length, width, and depth, with lengths ranging from 1mm to 5mm, widths from 0.05mm to 0.2mm, and depths from 0.01mm to 0.03mm. Composite polygons are primarily used for complex patterns or logos on syringes, such as corporate logos, with precise recording and definition of vertex coordinates, side length ratios, and internal angles.

[0030] When inputting the four-way field-of-view images into the deep learning-based semantic segmentation network, an improved U-Net network architecture is used. In the encoder, a 3×3 convolution kernel with a stride of 2 is used for continuous downsampling, doubling the number of channels with each downsampling. For example, if the input image size is 256×256×3, after the first downsampling, the image size becomes 128×128 with 64 channels; after another downsampling, the image size becomes 64×64 with 128 channels, and so on. This approach efficiently extracts multi-scale features from the image, effectively capturing everything from small-scale scale line details to larger-scale overall structural features. A weighted fusion approach is used to fuse shallow detail features and deep semantic features through skip connections. Shallow detail features are given a higher weight, as scale mark defects often manifest in subtle details. For example, a weight of 0.6 is set for shallow features, and 0.4 is set for deep semantic features. This allows for better preservation of details such as the clarity of scale mark edges and the presence of minor scratches during fusion. Furthermore, deep semantic features provide an understanding of the overall structure, improving the ability to identify complex defects. In the output layer, five output branches are set according to the five types of geometric units in the shape primitive library. Each branch uses the Softmax activation function to calculate the probability that each pixel in the four-way field of view acquisition image belongs to the corresponding geometric unit type. Taking the standard horizontal scale line branch as an example, for a certain pixel in the image, if the probability of belonging to the standard horizontal scale line after Softmax calculation is greater than 0.8, then the pixel is determined to belong to the standard horizontal scale line category. Through this precise calculation and classification, a more accurate image to be inspected is obtained, which provides a solid data foundation for subsequent defect identification, greatly improves the accuracy and reliability of detection, and meets the invention purpose of performing accurate appearance detection on the syringe scale line.

[0031] In the defect identification step, a syringe appearance detection model is constructed, the image to be inspected is input into the syringe appearance detection model, and the defect identification detection output is obtained after the model detection branch is matched according to the image geometry type, and the syringe appearance defect result is output based on the branch detection result. When all branch detection results are defect-free, the output syringe appearance defect result is qualified; otherwise, the output syringe appearance defect result is defective.

[0032] When the geometric unit type is a horizontal scale line or a vertical scale line, the multi-print detection branch is started. First, the target detection algorithm is used to accurately locate the geometric unit of the scale line, and the primitive bounding box and pixel coordinates are output. For example, the YOLO algorithm is used to quickly locate the position of the scale line. Then, based on the primitive bounding box and pixel coordinates, the pixel length of the scale line is calculated. According to the predetermined physical size mapping relationship, the pixel length is converted into the actual length. Assuming that it is known that 100 pixels correspond to an actual length of 1mm, the actual length is obtained by calculation and compared with the preset length threshold. If the actual length of a horizontal scale line is 0.1mm shorter than the preset threshold, it is determined to be a short line defect and the comparison result is output.

[0033] When the geometric unit type is a font structure frame, defect dirt, or composite polygon, the coverage detection branch begins. Taking the font structure frame as an example, its pixel coordinates are first calibrated, and the corresponding mask area is generated using a semantic segmentation algorithm. The mask outline is then extracted using the Canny edge detection algorithm. The effective pixel ratio in the mask area is calculated to obtain the coverage rate. If the coverage rate falls below the preset threshold of 80%, it is judged as incomplete coverage. At the same time, the mask outline is checked for broken segments. If the length of the broken segment exceeds the preset threshold of 0.5mm, it is judged as a local missing defect and the judgment result is output.

[0034] Based on the test results of each branch, if all branch test results are defect-free, the syringe appearance defect result is output as qualified; otherwise, the syringe appearance defect result is output as defective. In this way, the accuracy and reliability of the test are improved, medical safety is guaranteed, and the purpose of the invention is achieved.

[0035] Specifically, such as Figures 2 to 4As shown, the syringe appearance inspection model constructs a multi-print detection branch and a coverage detection branch according to the geometric unit type of the image to be inspected through preset mapping rules. When the geometric unit type is a horizontal scale line or a vertical scale line, a multi-print detection branch is constructed based on the pixel space distribution of the geometric unit to perform defect detection through line length threshold comparison and spacing analysis; when the geometric unit type is a font structure frame, defect dirt or a complex polygon, a coverage detection branch is constructed based on the contour integrity of the geometric unit to perform defect detection through coverage calculation and fracture feature recognition; when any detection branch detects a defect, the syringe appearance inspection model outputs the syringe appearance defect result as the presence of a defect.

[0036] The YOLO algorithm is used as the target detection algorithm for locating scale lines. To address the unique characteristics of medical syringe scale line images, the model is trained using a large amount of image data containing scale lines of varying specifications and styles. This data covers common scale line styles as well as special or variant situations that may arise during production. During training, the model learns the characteristics of scale lines, such as their color, texture, shape, and relative position to surrounding patterns. In actual detection, when four-way field-of-view imagery is input into the model, it can quickly identify the geometric units of horizontal and vertical scale lines and output precise primitive bounding boxes and pixel coordinates.

[0037] When calculating the pixel length of the scale line, it is determined based on the coordinate information of the primitive bounding box through a specific pixel calculation method. For example, the number of pixels along the scale line is counted, and the image resolution information is combined to ensure the accuracy of the calculation. Afterwards, the actual length is converted according to the preset physical size mapping relationship. This mapping relationship is determined during the system calibration phase. A high-precision standard scale mold is used for image acquisition. The actual scale length of the mold is compared with the pixel length in the image to obtain an accurate mapping ratio, such as 100 pixels corresponding to 1mm. In the process of comparing the actual length with the preset length threshold, the system will compare the converted actual length with the threshold set according to the production standard. For a 1ml syringe, the standard scale line length is 2mm. Taking into account the production tolerance, the length threshold range is set to 1.9mm-2.1mm.

[0038] In terms of defect detection accuracy, the multi-print detection branch can accurately identify abnormal scale line lengths. In an inspection of a certain manufacturing company, the traditional detection method had a missed detection rate of 5%-10%. After adopting this branch, the missed detection rate for defects such as multiple scale line printing and abnormal line lengths was reduced to less than 1%. In terms of production quality control, real-time detection can promptly detect problems with production equipment. If products with scale lines that are too long or too short appear continuously, the system will issue an alarm, prompting staff to check and adjust the scale line printing module of the printing equipment, reducing the defective product rate and improving production efficiency. From the perspective of medical safety, it effectively avoids dosage errors caused by scale line problems, providing strong protection for patient safety.

[0039] Specifically, such as Figures 2 to 4 As shown, the multi-print detection branch includes positioning the geometric units of the horizontal scale lines or the vertical scale lines, outputting the primitive bounding box and pixel coordinates, calculating the scale line pixel length based on the primitive bounding box and pixel coordinates, converting the actual length according to a preset physical size mapping relationship, comparing the actual length with a preset length threshold, and outputting the comparison result.

[0040] Complex production environments, such as those involving electromagnetic interference and unstable lighting conditions on factory floors, can affect the accuracy of the multi-print detection branch. To address these issues, the SORT algorithm is used as a target tracking algorithm for locating geometric units within horizontal and vertical scale lines. This algorithm incorporates deep learning recognition of scale line features, enabling more accurate positioning of scale lines and providing stable output of primitive bounding boxes and pixel coordinates, even in the presence of sudden lighting changes.

[0041] When calculating the pixel length of scale lines, an image correction algorithm is introduced to account for potential distortion during image acquisition. By correcting the distortion of the captured image, the pixel length calculation of the scale lines is more accurate. For example, the camera is calibrated using the Zhang calibration method to obtain the camera's internal parameters and distortion parameters, and the captured image is corrected. A dynamic calibration mechanism is employed to convert the actual length based on the preset physical dimension mapping relationship. At regular intervals or after testing a certain number of syringes, the mapping relationship is calibrated using a calibration block of a standard length to ensure the accuracy of the actual length calculation. The preset length threshold is no longer a fixed value; instead, it is dynamically adjusted based on the process requirements of different syringe production batches. For example, if the tolerance range for the scale line length of a certain batch of 10ml syringes is reduced due to production process adjustments, the system will automatically adjust the preset length threshold to ensure detection accuracy and adaptability.

[0042] Specifically, such as Figures 2 to 4As shown, the coverage detection branch includes calibrating the pixel coordinates of the geometric units of the font structure frame, defect dirt or compound polygon, performing semantic segmentation, generating the corresponding mask area, extracting the mask contour through edge detection, and calculating the effective pixel ratio in the mask area to obtain the coverage rate. If the coverage rate is lower than the preset threshold, it is determined that the coverage is incomplete. If a broken segment is detected in the mask contour and the length exceeds the preset threshold, it is determined to be a local missing defect, and the determination result is output.

[0043] For glass syringes, semantic segmentation is performed using a multispectral image-based segmentation algorithm. In addition to standard visible light images, near-infrared spectral images are also collected. Combining these two image types allows for more accurate identification of font structure frames, defects, contamination, and the boundaries of complex polygons, resulting in a more precise mask region. Morphological operations are used to optimize the edges when extracting the mask outline. Dilation is used to enlarge the edges, followed by erosion to restore them. This removes noise caused by reflections and improves the accuracy of the extracted mask outline. For coverage calculation, an adaptive threshold calculation method is used to account for the possibility that some pixels may be misclassified as invalid due to glass reflections. The threshold for valid pixels is dynamically adjusted based on the overall brightness and contrast of the image to ensure accurate coverage calculation. The preset threshold is adjusted based on the transmittance and surface smoothness of the glass material. For example, for glass syringes with high transmittance and a smooth surface, the preset coverage threshold is increased to 92%.

[0044] For syringes made of plastic, since surface texture may interfere with defect detection, the image is first denoised before calibrating the pixel coordinates. A denoising algorithm based on wavelet transform is used to remove the noise caused by surface texture and retain useful defect information. In the semantic segmentation process, the attention mechanism in deep learning is introduced to make the model pay more attention to areas where defects may exist, thereby improving segmentation accuracy. When calculating the coverage rate, considering that tiny depressions on the surface of the plastic material may affect the judgment of effective pixels, three-dimensional reconstruction technology is used to assist in the calculation. By performing three-dimensional reconstruction on the syringe surface, more accurate surface information is obtained, thereby more accurately calculating the effective pixel ratio. The preset threshold for the length of the fracture segment is adjusted according to the elasticity and deformation ease of the plastic material. For example, for plastic syringes with greater elasticity, the preset threshold for the length of the fracture segment is adjusted to 0.2mm to more accurately detect local missing defects.

[0045] Specifically, such as Figures 2 to 4As shown, it also includes an interference error verification step, including selecting a syringe with a qualified appearance defect result output as a syringe to implant a known defect, and using a disc machine control system to periodically change the syringe clamping angle and positioning accuracy to set a rotation interference, and the syringe after setting the rotation interference is again passed through the syringe scale line 360 ​​full-view appearance detection system for real-time defect detection, and outputting the defect missed detection rate and false alarm rate within the disturbance period according to the detection results, and outputting a correction instruction when the defect missed detection rate and false alarm rate are higher than the preset corresponding threshold value.

[0046] During the interference error verification step, when selecting qualified syringes and implanting known defects, full consideration is given to various defects that may occur in actual production. For example, in addition to implanting common defects such as missing 0.1mm scale lines and fonts, and 0.1mm dirt, special defects are also implanted to address issues that are prone to occur in specific production processes, such as blurred scale lines due to unstable ink quality and jagged scale line edges due to mold wear.

[0047] When setting the rotational interference, the disc machine control system not only cyclically varies the syringe gripping angle and positioning accuracy, but also simulates different rotational speeds and accelerations. On high-speed production lines, syringes rotate at relatively high speeds. Based on the normal production speed, the interference test was conducted with speed variations of ±20%. For acceleration, different acceleration variations during the start-up and stop phases were simulated, such as 0.5g, 1g, and 1.5g (g represents the acceleration due to gravity) during the start-up phase, and different decelerations during the stop phase. This more comprehensively simulates the rotational conditions that may occur in actual production.

[0048] During real-time defect detection, in order to more accurately analyze the missed detection and false alarm rates, in addition to recording the overall number of missed detections and false alarms, we also collect statistics for different types of defects. For example, we categorize defects such as scale line defects, font defects, and dirt defects, and analyze the missed detection and false alarm rates for each defect under different rotational interference conditions. Furthermore, statistical analysis is combined with production batch information. Because different batches of products may vary due to factors such as raw materials and production environment, batch analysis can more accurately identify potential problems.

[0049] The preset thresholds are not fixed but are adjusted dynamically based on production process improvements, rising product quality standards, and past inspection data. If the missed detection and false alarm rates for multiple consecutive batches of products under specific rotational interference conditions are low and stable, the thresholds can be appropriately lowered to improve the detection system's sensitivity. Conversely, if the production process undergoes significant changes or new defect types emerge, the thresholds can be raised accordingly to ensure the reliability of the detection system.

[0050] Specifically, such as Figures 2 to 4 As shown, it also includes a dynamic parameter correction step. When receiving a correction instruction, the generalization parameters of the syringe appearance inspection model for the rotational offset image are adjusted through incremental learning based on the defect missed detection rate, false alarm rate and known defect types within the disturbance period, and the error compensation is performed on the geometric deformation of the image to be inspected based on the adjusted parameters.

[0051] When receiving correction instructions, the system uses advanced deep learning algorithms to incrementally adjust the generalization parameters of the syringe appearance inspection model for rotationally offset images. For example, a model based on the Transformer architecture leverages its powerful attention mechanism to more effectively capture feature changes in rotationally offset images. During incremental learning, newly acquired data containing rotational disturbances and known defects is fused with the original training data, and the model parameters are updated using an optimization algorithm.

[0052] Targeted adjustments are made to the model's various parameters based on the defect miss rate, false alarm rate, and known defect types within the disturbance period. For scale line defect miss rates, adjustments are focused on parameters related to scale line feature extraction, such as convolution kernel weights and pooling layer parameters, to enhance the model's ability to identify scale lines. For defect types with high false alarm rates, adjustments are made to the classifier's threshold parameters to optimize the model's decision boundary.

[0053] To compensate for geometric deformation in the image under inspection, a method based on image registration is employed. A feature point matching algorithm is used to find corresponding feature points between the rotationally disturbed image and the standard image. These feature points are then used to calculate geometric transformation parameters such as the image's rotation angle, translation, and scale. Based on these calculated parameters, a geometric transformation is performed on the image under inspection to accurately compensate for the geometric deformation caused by rotational offset.

[0054] To verify the effectiveness of dynamic parameter correction, a certain number of test samples are retested after the correction. These test samples include both previously problematic samples and new samples. The test results before and after the correction are compared to assess changes in missed defect detection rates and false alarm rates. If the correction is unsatisfactory, parameter adjustments and testing are repeated until satisfactory detection accuracy is achieved. The corrected parameters and test results are recorded for subsequent production data analysis and model optimization.

[0055] A 360-degree full-view appearance inspection system for syringe graduations, comprising: A prism imaging and lighting module folds the reflected light from four orthogonal fields of view around the syringe to be inspected into the same imaging plane of the sampling device through a prism module, and evenly illuminates the syringe to be inspected through a light source group; a data sampling and processing module, which acquires a four-dimensional field-of-view image of the syringe to be inspected through the sampling device, performs shape primitive decomposition and feature encoding on the four-dimensional field-of-view image using a stratified sampling strategy, classifies the four-dimensional field-of-view image according to the type of geometric units in the image, and labels the image geometric type to obtain the image to be inspected; The defect recognition module to be inspected constructs a syringe appearance detection model, inputs the image to be inspected into the syringe appearance detection model, performs defect recognition detection output after the model detection branch is matched according to the image geometry type, and outputs the branch detection result, and outputs the syringe appearance defect result based on the branch detection result. When all branch detection results are defect-free, the output syringe appearance defect result is qualified; otherwise, the output syringe appearance defect result is defective.

[0056] Specifically, the prism module includes five high-reflection plane lenses, which are arranged orthogonally at an angle of 45 degrees. The first lens reflects the light with a 0-degree field of view directly to the corresponding sensor area of ​​the sampling device; the second lens reflects the light with a 270-degree field of view directly to the corresponding sensor area; the third lens refracts the light reflected from the 90-degree field of view to the fourth lens, and the light enters the corresponding sensor area after a second reflection; the fourth lens refracts the light reflected from the 180-degree field of view to the fifth lens, and the light enters the corresponding sensor area after a second reflection.

[0057] The above shows and describes the basic features, principles, and advantages of the present invention. It should be noted that the present invention is not limited to the above embodiments, which are only some embodiments. Without departing from the spirit and scope of the present invention, various improvements and supplements made are considered to be within the scope of protection of the present invention.

Claims

1. A 360-degree full-view appearance inspection method for syringe graduations, characterized in that: The steps include: a prism imaging and lighting step, folding the reflected light from four orthogonal fields of view around the syringe to be inspected into the same imaging plane of the sampling device through a prism module, and uniformly lighting the syringe to be inspected through a light source group; a data sampling and processing step, acquiring a four-dimensional field-of-view image of the syringe to be inspected by the sampling device, performing shape primitive decomposition and feature encoding on the four-dimensional field-of-view image using a stratified sampling strategy, classifying the four-dimensional field-of-view image according to the type of geometric units in the image and marking the image geometric type to obtain an image to be inspected; In the defect recognition step, a syringe appearance detection model is constructed, the image to be inspected is input into the syringe appearance detection model, a defect recognition detection is performed after the model detection branch is detected according to the image geometry type matching model, and a branch detection result is outputted, and the syringe appearance defect result is outputted based on the branch detection result. When all branch detection results are non-defective, the syringe appearance defect result is outputted as qualified; Otherwise, the output result of the syringe appearance defect is that there is a defect.

2. The method for detecting the appearance of syringe graduations at 360-degree angles according to claim 1, characterized in that: It also includes an interference error verification step, including selecting a syringe with a qualified syringe appearance defect result output and implanting a known defect, and using the disc machine control system to periodically change the syringe clamping angle and positioning accuracy to set rotation interference, and the syringe after setting the rotation interference is again passed through the syringe scale line 360 ​​full-view appearance detection system for real-time defect detection, and outputting the defect missed detection rate and false alarm rate within the disturbance period according to the detection results, and outputting a correction instruction when the defect missed detection rate and false alarm rate are higher than the preset corresponding thresholds.

3. The method for detecting the appearance of syringe graduations at 360 degrees in all viewing angles according to claim 2, characterized in that: It also includes a dynamic parameter correction step. When a correction instruction is received, the generalization parameters of the syringe appearance inspection model for the rotational offset image are adjusted through incremental learning based on the defect omission rate, false alarm rate and known defect types within the disturbance period, and the geometric deformation of the inspected image is compensated for errors based on the adjusted parameters.

4. The method for detecting the appearance of syringe graduations at 360-degree angles according to claim 1, characterized in that: The prism imaging and lighting step includes setting plane mirrors at a 45-degree inclination angle in the four directions of the syringe to form a dichroic prism matrix. The dichroic prism matrix reflects the four-directional field of view image of the syringe to the corresponding sensor area of ​​the sampling device, and folds the four-way light signal on the sampling device to form four spatially separated sub-images to form a four-directional field of view acquisition image.

5. The method for detecting the appearance of syringe graduations at 360-degree angles according to claim 1, characterized in that: The stratified sampling strategy includes defining a syringe scale line shape primitive library, wherein the shape primitive library includes: standard horizontal scale lines, standard vertical scale lines, font structure frames, defective and dirty areas, and composite polygons; inputting the four-way field of view acquisition image into a semantic segmentation network based on deep learning, extracting multi-scale features in the image through continuous downsampling and convolution in the encoder, fusing shallow detail features and deep semantic features of the image through jump connections, setting output branches in the output layer according to the geometric unit types in the shape primitive library, and completing the classification of the four-way field of view acquisition image by calculating the probability that each pixel point in the four-way field of view acquisition image belongs to the geometric unit type in each output branch to obtain the image to be inspected.

6. The method for detecting the appearance of syringe graduations at 360-degree angles according to claim 1, characterized in that: The syringe appearance inspection model constructs a multi-print detection branch and a coverage detection branch according to the geometric unit type of the image to be inspected through preset mapping rules. When the geometric unit type is a horizontal scale line or a vertical scale line, a multi-print detection branch is constructed based on the pixel spatial distribution of the geometric unit to perform defect detection through line length threshold comparison and spacing analysis; when the geometric unit type is a font structure frame, defect dirt or a complex polygon, a coverage detection branch is constructed based on the contour integrity of the geometric unit to perform defect detection through coverage calculation and fracture feature recognition; when any detection branch detects a defect, the syringe appearance inspection model outputs the syringe appearance defect result as the presence of a defect.

7. The method for detecting the appearance of syringe graduations at 360 degrees in all viewing angles according to claim 6, characterized in that: The multi-print detection branch includes positioning the geometric units of the horizontal scale lines or the vertical scale lines, outputting the primitive bounding box and pixel coordinates, calculating the scale line pixel length based on the primitive bounding box and pixel coordinates, converting the actual length according to a preset physical size mapping relationship, comparing the actual length with a preset length threshold, and outputting the comparison result.

8. The method for detecting the appearance of syringe graduations at 360-degree angles according to claim 6, characterized in that: The coverage detection branch includes calibrating the pixel coordinates of the geometric units of the font structure frame, defect dirt or compound polygon, performing semantic segmentation, generating the corresponding mask area, extracting the mask contour through edge detection, and calculating the effective pixel ratio in the mask area to obtain the coverage rate. If the coverage rate is lower than the preset threshold, it is determined that the coverage is incomplete. If a broken segment is detected in the mask contour and the length exceeds the preset threshold, it is determined to be a local missing defect, and the determination result is output.

9. A 360-degree full-view appearance inspection system for syringe graduations, applicable to the 360-degree full-view appearance inspection method for syringe graduations according to any one of claims 1 to 8, characterized in that: include: A prism imaging and lighting module folds the reflected light from four orthogonal fields of view around the syringe to be inspected into the same imaging plane of the sampling device through a prism module, and evenly illuminates the syringe to be inspected through a light source group; a data sampling and processing module, which acquires a four-dimensional field-of-view image of the syringe to be inspected through the sampling device, performs shape primitive decomposition and feature encoding on the four-dimensional field-of-view image using a stratified sampling strategy, classifies the four-dimensional field-of-view image according to the type of geometric units in the image, and labels the image geometric type to obtain the image to be inspected; The defect recognition module to be inspected builds a syringe appearance inspection model, inputs the image to be inspected into the syringe appearance inspection model, performs defect recognition detection after detecting branches based on the image geometry type matching model, and outputs branch detection results, and outputs the syringe appearance defect results based on the branch detection results. When all branch detection results are defect-free, the syringe appearance defect result is output as qualified; Otherwise, the output result of the syringe appearance defect is that there is a defect.

10. The syringe scale line 360-degree full-view appearance inspection system according to claim 9, characterized in that: The prism module includes five high-reflection plane lenses, which are arranged orthogonally at an angle of 45 degrees. The first lens reflects the light from the 0-degree field of view directly to the corresponding sensor area of ​​the sampling device; the second lens reflects the light from the 270-degree field of view directly to the corresponding sensor area; the third lens refracts the light reflected from the 90-degree field of view to the fourth lens, and the light enters the corresponding sensor area after secondary reflection; the fourth lens refracts the light reflected from the 180-degree field of view to the fifth lens, and the light enters the corresponding sensor area after secondary reflection.

Citation Information

Patent Citations

  • Method for automatically detecting scales of injector needle cylinders by using machine vision system

    CN102303019A

  • Measurement of syringe graduation marks using a vision system

    CN108601893A

  • Syringe scale defect detection method based on deep learning and scale grouping matching

    CN114219785A

  • Injector scale line detection method

    CN116930203A

  • Measurement of syringe graduation marks using a vision system

    US20190019306A1

Cited By

  • Liquid crystal glass defect detection method, system and equipment based on multispectral imaging

    CN121033007A