Chip character recognition algorithm combining text detection and deep learning
By combining MSER text detection and deep learning OCR character recognition, using multiple sets of recognition results to correct errors and character area template matching, the problem of slow detection speed and low accuracy in the chip packaging process is solved, and efficient and accurate chip characters are achieved. Identification and packaging quality inspection.
Patent Information
- Application Number
- CN202410652363.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-09-10
AI Technical Summary
In the existing technology, machine vision detection is difficult to meet the needs of high speed, high precision and high accuracy in the chip packaging process. Traditional OCR technology has limited accuracy in text detection, while deep learning OCR technology has difficulty in real-time performance and computational resource consumption. Meet the requirements of industrial scenarios.
Combining the Most Stable Extreme Region (MSER) text detection and deep learning OCR character recognition, MSER is used for preliminary positioning and text detection, deep learning OCR is used for character recognition, and multiple sets of recognition results are used to verify each other and correct errors, combined with character area templates Matching for packaging quality inspection.
It improves the accuracy and speed of chip character recognition, meets the real-time and accuracy requirements of industrial scenarios, reduces computing resource consumption, and achieves accurate detection of chip packaging quality.
Smart Images

Figure CN118629025A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer vision recognition, and in particular to a chip character recognition algorithm that combines text detection and deep learning. Background Art
[0002] The tape and reel packaging of integrated circuit chips has the advantages of high automation, large packaging volume and high speed, and is the mainstream packaging method for chips. In order to ensure that the chip has a consistent deflection angle during tape and reel packaging, and there are no problems such as missing or overprinting of characters, it has become a common practice in the industry to conduct a full inspection of the chip after packaging. In order to solve the problems of fatigue and subjective inspection in the manual visual inspection of finished chip packaging inspection of small and medium-sized packaging companies, especially the difficulty of manual visual inspection to meet the high-speed, high-precision and high-accuracy inspection requirements of chips, machine vision inspection has become a developing method in the industry.
[0003] Machine vision inspection has the following advantages: 1) non-contact, non-destructive, safe and reliable; 2) high inspection accuracy and fast inspection speed; 3) objective, fatigue-free and continuous online inspection. It is becoming the development direction for electronic packaging companies to improve production efficiency and ensure product quality.
[0004] In machine vision inspection, the Maximally Stable Extremal Region (MSER) technology and the Optical Character Recognition (OCR) technology are widely used.
[0005] Among them, the maximum stable extreme region (MSER) is a method for spot detection in an image. It is used to find correspondences in two images of different perspectives. This method extracts comprehensive element correspondences from the image, which is helpful for wide baseline matching, as well as better stereo matching and object recognition algorithms. MSER performs binarization on an image that has been processed into grayscale. The threshold of this processing increases from 0 to 255. The increase in this threshold is similar to the increase in the horizontal plane on a piece of land. As the horizontal plane rises, the high and low uneven land areas will continue to be submerged. This is the watershed algorithm, and the difference in height is the difference in grayscale values in the image. In an image containing text, some areas (such as text) are consistent in color (grayscale value), so they will not be covered for a period of time when the horizontal plane (threshold) continues to grow, until the threshold rises to the grayscale value of the text itself, they will be submerged. These areas are called maximum stable extreme regions.
[0006] Optical character recognition (OCR) refers to the process in which an electronic device (such as a scanner or digital camera) examines characters printed on paper, determines their shapes by detecting dark and light patterns, and then uses character recognition methods to translate the shapes into computer text. That is, for printed characters, an optical method is used to convert the text in a paper document into a black and white dot matrix image file, and recognition software is used to convert the text in the image into text format for further editing and processing by word processing software.
[0007] On the one hand, in terms of accuracy, MSER’s detection effect on text areas is worse than that of deep learning, but MSER can be used in the early stages of text detection in natural scenes with high efficiency.
[0008] On the other hand, both traditional OCR technology and mainstream deep learning OCR technology include text detection and text recognition. Traditional OCR is suitable for simple scene calculations and consumes less resources, but the text recognition accuracy is not high and cannot meet the accuracy requirements of industrial scenes. Deep learning OCR is suitable for complex scenes and has high recognition accuracy, but consumes more computing resources and time, and it is difficult to meet the real-time requirements of industrial scenes.
[0009] Both traditional OCR technology and mainstream deep learning OCR technology include text detection and text recognition. Traditional OCR is suitable for simple scene calculations and consumes less resources, but the improvement of text recognition accuracy is limited. Deep learning OCR is suitable for complex scenes, with high recognition accuracy, but it consumes more computing resources and time, and it is difficult to meet the real-time requirements of industrial scenes. After in-depth research, it is found that its text detection takes a long time, while text recognition takes a short time. Moreover, as the number of sample images increases, the accuracy of deep learning OCR will continue to improve. Chip character OCR requires high real-time and high accuracy. The experimental analysis of chip images shows that the background is single and fixed. The text detection of traditional OCR fully meets the requirements. Among them, MSER connected domain analysis is stable and fast in text detection. It is the mainstream method of traditional text detection, while deep learning OCR has more accurate text recognition, and the accuracy continues to improve with the increase of training samples.
[0010] To this end, an invention patent with a publication number of CN108898138A in the prior art discloses a scene text recognition method based on deep learning, which is specifically implemented in the following steps: processing the image P that needs scene text recognition, using the maximum stable extreme region algorithm MSER to locate the text, obtaining the candidate text area S and the circumscribed rectangle G of the text area S, and preprocessing, inputting the preprocessed candidate text area S into the trained convolutional deep belief network model for feature extraction, and obtaining the feature matrix A, which is input into a linear support vector machine, verifying the candidate text area S, and then filtering out a large number of non-text areas to obtain the text area S′, classifying and identifying the characters therein, and then obtaining the final output. This patent solves the problems of complex background, low resolution and random distribution of text images in natural scenes in the prior art. Summary of the invention
[0011] A brief summary of embodiments of the present invention is provided below to provide a basic understanding of certain aspects of the present invention. It should be understood that the following summary is not an exhaustive summary of the present invention. It is not intended to identify key or important parts of the present invention, nor is it intended to limit the scope of the present invention. Its purpose is merely to provide certain concepts in a simplified form as a prelude to a more detailed description discussed later.
[0012] In order to solve the above technical problems, the present invention proposes a method combining MSER text detection and OCR character recognition, which gives full play to the respective advantages of the two methods and improves the recognition speed while ensuring the recognition accuracy.
[0013] To solve the above technical problems, the present application provides a chip character recognition algorithm that combines text detection and deep learning, including:
[0014] Obtain a set of images to be identified of the tape to be detected;
[0015] The m images to be identified in the set of images to be identified are located and identified respectively; the positioning and identification specifically adopt the most stable extreme region algorithm MSER for positioning to obtain the position of the chip to be identified; then the image to be identified at the position of the chip to be identified is subjected to text recognition, and m chip character recognition results are obtained respectively, and the confidence is given;
[0016] The character recognition results of m chips are mutually verified and corrected to obtain the final recognition result of the chip roll.
[0017] As an implementation scheme, the method further includes the step of using a character region template matching method to detect chip missing, mixed loading, deflection and character printing quality. The character region template matching method is to train a set of images to be identified to obtain a character region template, detect the reel to be detected based on the character region template, and accurately detect the chip packaging quality of the reel to be detected by using the template matching result and region fitting.
[0018] As another embodiment, the method further comprises the step of performing character region template training on the image to be recognized according to the determined final recognition result, and the step specifically comprises:
[0019] Determine the chip character of the tape to be detected according to the final recognition result;
[0020] Identify the m images to be identified, and locate the chip position with the highest recognition confidence of the final recognition result;
[0021] The chip position is extracted as an initial template through image segmentation;
[0022] Perform template matching on the initial template;
[0023] The chips matched to the m images to be identified are superimposed on the initial template to obtain a standardized template as the chip template.
[0024] Furthermore, the method also includes a chip quality detection step, which includes: detecting chip missing, mixed loading, deflection and character printing quality of the chips on the reel to be detected according to the chip template.
[0025] As an implementation scheme, the text recognition of the image to be recognized at the position of the recognition chip is specifically performed by using the optical character recognition algorithm PaddleOCR. PaddleOCR is an open source OCR library of Baidu, including two parts: text detection model and text recognition model, which supports text recognition in multiple languages and complex situations.
[0026] The present invention adopts the above scheme, first uses MSER to perform text detection, locates the character position of the chip in the first m images of each roll of tape, and determines the number of chips in each image Nm, and then uses deep learning OCR to recognize each chip character and give confidence. Then the recognition results of the Nm group are verified and corrected, and finally the unique recognition result of the character is obtained. The chip character recognition results of the Nm group are used to verify and correct each other, which ensures the accuracy of the final result. Even if there are occasional recognition errors, they will be corrected by the recognition results of other characters, thereby ensuring the correctness of the final result. In addition, the present invention combines MSER text detection and OCR character recognition through the above scheme, giving full play to the respective advantages of the two methods, and improving the recognition speed while ensuring the recognition accuracy. After testing, the MSER text detection time of a 2 million pixel image is about 50ms, and the PaddleOCR text recognition time is about 100ms, which is significantly improved in speed compared with deep learning OCR, and the text recognition accuracy is also higher than that of traditional OCR. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The present invention may be better understood by referring to the following description given in conjunction with the accompanying drawings, wherein the same or similar reference numerals are used throughout the drawings to represent the same or similar components. The accompanying drawings, together with the following detailed description, are included in and form a part of this specification and are used to further illustrate the preferred embodiments of the present invention and to explain the principles and advantages of the present invention. In the drawings:
[0028] Figure 1 This is a flow chart of chip package character OCR recognition in an embodiment of the present invention;
[0029] Figure 2 This is a flow chart of character area template training in an embodiment of the present invention;
[0030] Figure 3 1 is a defect diagram set in an embodiment of the present invention, (a) is a schematic diagram of the film expansion defect set, (b) is a schematic diagram of the film pressing groove defect set, and (c) is a chip mixed installation and missing installation defect diagram set;
[0031] Figure 4 Figures 1 and 2 are chip character printing defect diagrams detected in an embodiment of the present invention, (a) is a schematic diagram of a chip surface overprinting defect, and (b) is a schematic diagram of a chip character missing printing defect. DETAILED DESCRIPTION
[0032] Embodiments of the present invention will be described below with reference to the accompanying drawings. Elements and features described in one drawing or one embodiment of the present invention may be combined with elements and features shown in one or more other drawings or embodiments. It should be noted that for the purpose of clarity, the representation and description of components and processes that are not related to the present invention and are known to those of ordinary skill in the art are omitted in the drawings and descriptions.
[0033] In order to improve the speed of chip tape inspection process and the accuracy of inspection results, the present invention proposes a chip optical character recognition (OCR) method that combines Maximally Stable Extremal Region (MSER) text detection and deep learning text recognition, and uses multiple groups of results to verify each other, thereby improving the accuracy of the final recognition result.
[0034] The chip character recognition algorithm combining text detection and deep learning of the present invention has a flowchart of the OCR process as shown in the following figure: Figure 1 As shown, specifically including:
[0035] Obtain a set of images to be identified of the tape to be detected, and select m images (which may be the first m images, or the middle m continuous or discontinuous images) as images to be identified;
[0036] m images to be identified in the set of images to be identified are positioned and identified respectively; the positioning and identification specifically adopt the most stable extreme region algorithm MSER for positioning to obtain the position of the chip to be identified; then text recognition is performed on the image to be identified at the position of the chip to be identified, and m chip character recognition results are obtained respectively, and confidence levels are given; the m chip character recognition results are respectively recorded as chip character recognition result N1, chip character recognition result N2, chip character recognition result N3, ... chip character recognition result Nm; chip character recognition result N1, chip character recognition result N2, chip character recognition result N3, ... chip character recognition result Nm form a set;
[0037] The character recognition results of the m chips in the set are mutually verified and corrected to obtain the final recognition result of the chip roll.
[0038] As a specific embodiment, the method further includes the step of using a character area template matching method to detect chip missing, mixed loading, deflection and character printing quality. The character area template matching method is to train a set of images to be identified to obtain a character area template, detect the reel to be detected based on the character area template, and accurately detect the chip packaging quality of the reel to be detected by using the template matching result and area fitting.
[0039] The character region template is obtained by training the character region template on the image to be recognized according to the determined final recognition result, and specifically includes:
[0040] Determine the chip character of the tape to be detected according to the final recognition result;
[0041] Identify the m images to be identified, and locate the chip position with the highest recognition confidence of the final recognition result;
[0042] The chip position is extracted as an initial template through image segmentation;
[0043] Perform template matching on the initial template;
[0044] The chips matched to the m images to be identified are superimposed on the initial template to obtain a standardized template as the chip template.
[0045] The present invention uses a character region template matching method to detect chip missing, mixed loading, deflection and character printing quality. According to the chip characters of the tape to be detected, high-quality character region template training is performed on the m images identified. The specific process is as follows: Figure 2 shown.
[0046] The present invention first uses MSER to perform text detection, locates the character position of the chip in the first m images of each roll of tape, and determines the number of chips in each image Nm, and then uses deep learning OCR to characterize each chip and give a confidence level. Then the recognition results of the Nm groups are verified and corrected, and finally a unique character recognition result is obtained. The character recognition results of the Nm groups of chips are used to verify and correct each other, which ensures the accuracy of the final result. Even if there are occasional recognition errors, they will be corrected by the recognition results of other characters, thereby ensuring the correctness of the final result.
[0047] In view of the problems of slow detection speed and strong subjectivity in manual visual inspection of tape-packaged chips in the integrated circuit industry, the present invention proposes an alternative solution with machine vision technology, realizes real-time detection of chip character recognition, and proposes a chip character OCR technology combining MSER and deep learning, which takes into account both character recognition speed and recognition accuracy. At the same time, a method for mutual verification and error correction of multiple groups of recognition results is proposed to ensure the accuracy of the results. High-quality character area templates are obtained through multi-image training, which improves the accuracy of character printing quality detection, and at the same time, the chip packaging quality is accurately detected with template matching results and area fitting.
[0048] The recognition results of traditional OCR, PaddleOCR and the combination of MSER text detection and PaddleOCR proposed in this invention were compared through experiments, proving that the proposed solution can effectively balance detection speed and recognition accuracy. In terms of chip packaging quality inspection, the proposed solution basically meets the packaging companies' requirements for film-coated chip character recognition, character printing quality inspection and chip finished product packaging inspection.
[0049] According to the algorithm of the present invention, the collected image data is detected and analyzed. The experiment sets 100 images of lamination groove defects and 100 images of film expansion defects; sets 50 images of reversal of two specifications of tape, that is, 300 chips with deflection angle problems and 50 chips with mixed or missing installation. Figure 3 shown.
[0050] The experiment tested 1257 images, of which 4917 were chips under the film; the deflection angle range was set to (-30°, 30°), the character overprinting area threshold, and the character missing threshold. The detection accuracy was statistically analyzed based on the designed small sample detection, and the detection results are shown in Table 1. According to the template training and character recognition as preparatory work, the detection time is not included. If 2500 chips are packaged in a 16mm wide tape, that is, two chips are processed per image, it takes about 7.7729 minutes; if 2000 chips are packaged in a 12mm wide tape, that is, 4 chips are processed per image, it takes about 5.1475 minutes.
[0051] Table 1 Defect detection experimental results
[0052]
[0053] All the set lamination defect images are detected, and the number of detected character missing print defect chips is large. The detected character printing quality defect chip images are segmented, such as Figure 4 As shown. By observing the defective chip image, it is found that the chip image segmented with multi-print defects does have a multi-print problem. Figure 4 (a) The circled part is marked. The detected chip character missing defects are relatively few, as shown below Figure 4 As shown in (b). In actual production, the area threshold needs to be set according to the workshop standard in combination with the actual production.
[0054] The chip character OCR method combining MSER and deep learning proposed in the present invention takes into account both character recognition speed and recognition accuracy; at the same time, a method for mutual verification and error correction of multiple groups of recognition results is proposed to ensure the accuracy of the results; high-quality character area templates are obtained through multi-image training, which improves the accuracy of character printing quality detection, and at the same time, the chip packaging quality is accurately detected by template matching results and area fitting.
[0055] The recognition results of traditional OCR, PaddleOCR and the combination of MSER text detection and PaddleOCR proposed in this paper were compared through experiments, proving that the proposed solution can effectively balance detection speed and recognition accuracy. In terms of chip packaging quality inspection, the proposed solution basically meets the packaging companies' requirements for film-coated chip character recognition, character printing quality inspection and chip finished product packaging inspection.
[0056] In summary, the present invention proposes a method combining MSER text detection and OCR character recognition, giving full play to the respective advantages of the two methods, and improving the recognition speed on the basis of ensuring the recognition accuracy. After testing, the MSER text detection time of a 2-megapixel image is about 50ms, and the PaddleOCR text recognition time is about 100ms, which is significantly faster than deep learning OCR, and the text recognition accuracy is also higher than traditional OCR.
[0057] In addition, the method of the present invention is not limited to being executed in the time sequence described in the specification, and may also be executed in other time sequences, in parallel or independently. Therefore, the execution order of the method described in this specification does not limit the technical scope of the present invention.
[0058] Although the present invention has been disclosed above by describing specific embodiments of the present invention, it should be understood that all the above embodiments and examples are exemplary rather than restrictive. Those skilled in the art may design various modifications, improvements or equivalents of the present invention within the spirit and scope of the appended claims. These modifications, improvements or equivalents should also be considered to be included in the protection scope of the present invention.
Claims
1. A chip character recognition algorithm combining text detection and deep learning, characterized by: include: Obtain a set of images to be identified of the tape to be detected; The m images to be identified in the set of images to be identified are located and identified respectively; the positioning and identification specifically adopt the most stable extreme region algorithm MSER for positioning to obtain the position of the chip to be identified; then the image to be identified at the position of the chip to be identified is subjected to text recognition, and m chip character recognition results are obtained respectively, and the confidence is given; The character recognition results of m chips are mutually verified and corrected to obtain the final recognition result of the chip roll.
2. The chip character recognition algorithm combining text detection and deep learning according to claim 1, characterized in that: The method also includes the step of using a character area template matching method to detect chip missing, mixed loading, deflection and character printing quality of the chip.
3. The chip character recognition algorithm combining text detection and deep learning according to claim 2 is characterized in that: The character region template matching method is to train a set of images to be recognized to obtain a character region template, detect the reel to be detected based on the character region template, and accurately detect the chip packaging quality of the reel to be detected based on the template matching result and region fitting.
4. The chip character recognition algorithm combining text detection and deep learning according to claim 1, characterized in that: The method further includes the step of training the character region template for the image to be recognized according to the determined final recognition result, and the step specifically includes: Determine the chip character of the tape to be detected according to the final recognition result; Identify the m images to be identified, and locate the chip position with the highest recognition confidence of the final recognition result; The chip position is extracted as an initial template through image segmentation; Perform template matching on the initial template; The chips matched to the m images to be identified are superimposed on the initial template to obtain a standardized template as the chip template.
5. The chip character recognition algorithm combining text detection and deep learning according to claim 4 is characterized in that: The method also includes a chip quality detection step, which includes: detecting chip missing, mixed loading, deflection and character printing quality of the chips on the reel to be detected according to the chip template.
6. The chip character recognition algorithm combining text detection and deep learning according to claim 1, characterized in that: The text recognition of the image to be identified at the position of the chip to be identified is specifically performed by using the optical character recognition algorithm PaddleOCR to perform text recognition.
Citation Information
Cited By
Calibration method, device, equipment and medium for optical identification in test processor
CN121438323A
