Chip component identification method and model training method and device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU SHIYUAN ELECTRONICS CO LTD
- Filing Date
- 2022-03-10
- Publication Date
- 2026-08-07
AI Technical Summary
[0005]本公开实施例提供一种芯片元器件的识别方法、模型训练方法及装置,用以解决对芯片元器件的识别的准确性偏低的问题
[0090]本公开实施例提供的芯片元器件的识别方法、模型训练方法及装置,通过获取待识别的芯片元器件的极性属性,以调用与极性属性对应的识别方法对待识别的芯片元器件进行识别处理的技术方案,提高了对芯片元器件进行识别处理的多样性和灵活性,且使得对芯片元器件的识别处理具有针对性,从而提高识别处理的有效性和可靠性,进而实现提高确定出的识别结果的准确性的技术效果。
Smart Images

Figure CN116798025B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to deep learning in artificial intelligence technology, and more particularly to a method for identifying chip components, a model training method, and an apparatus. Background Technology
[0002] Microchips are a general term for semiconductor components used to form integrated circuits (ICs).
[0003] In existing technologies, the main methods for identifying chip components include: obtaining a string on the chip component, and combining the string with a preset template to determine the identification result of the chip component.
[0004] However, the above method has the technical problem of low identification accuracy. Summary of the Invention
[0005] This disclosure provides a method, model training method, and apparatus for identifying chip components, in order to solve the problem of low accuracy in identifying chip components.
[0006] In a first aspect, embodiments of this disclosure provide a method for identifying chip components, including:
[0007] Obtain the polarity attribute of the chip component to be identified, wherein the polarity attribute is either polarized or non-polarized;
[0008] The identification method for identifying the chip component to be identified is invoked according to the polarity attribute, wherein the identification methods corresponding to polarity and non-polarity are different;
[0009] The chip component to be identified is identified according to the called identification method, and the identification result is obtained.
[0010] In some embodiments, if the polarity attribute is non-polar, the chip component to be identified is identified according to the invoked identification method to obtain an identification result, including:
[0011] Obtain the image of the chip component to be identified;
[0012] If the image to be identified is an inverted image, then the inverted image is processed for recognition based on a preset mapping relationship to obtain the recognition result, wherein the mapping relationship is used to characterize the correspondence between inverted text and characters.
[0013] In some embodiments, if the image to be identified is an inverted image, the inverted image is subjected to recognition processing based on a preset mapping relationship to obtain the recognition result, including:
[0014] If the image to be identified is an inverted image, then obtain the inverted description text of the chip component to be identified in the inverted image;
[0015] The character corresponding to the inverted description text is determined according to the mapping relationship, and the recognition result is determined according to the determined character corresponding to the inverted description text.
[0016] In some embodiments, the recognition result is determined based on the characters corresponding to the inverted descriptive text, including:
[0017] Based on the mapping relationship, the characters corresponding to the inverted description text are reverse-mapped to obtain the recognition result.
[0018] In some embodiments, if the polarity attribute is non-polar, then an identification method for identifying the chip component to be identified is invoked according to the polarity attribute, including: invoking a non-polarity identification model;
[0019] In addition, the chip component to be identified is identified according to the called identification method to obtain the identification result, including: the chip component to be identified is identified based on the non-polarity identification model to obtain the identification result;
[0020] The non-polarity recognition model is trained based on a first sample dataset, which includes a first sample image, which is an inverted image, and includes descriptive text of non-polarity chip components.
[0021] In some embodiments, if the polarity attribute is polarized, the chip component to be identified is identified according to the invoked identification method to obtain an identification result, including:
[0022] Obtain the image of the chip component to be identified;
[0023] The image to be identified is subjected to image enhancement processing to obtain an enhanced image, and the enhanced image is subjected to recognition processing to obtain the recognition result.
[0024] In some embodiments, if the polarity attribute is polarized, then an identification method for identifying the chip component to be identified is invoked according to the polarity attribute, including: invoking a polarized identification model;
[0025] In addition, the chip component to be identified is identified according to the called identification method to obtain the identification result, including: the chip component to be identified is identified based on the polarity identification model to obtain the identification result;
[0026] The polarity recognition model is trained based on a second sample dataset, which includes second sample images and descriptive text for polarized chip components.
[0027] In some embodiments, the polarity recognition model is obtained by performing image enhancement processing on the second sample image and training it based on the second sample image and the enhanced image.
[0028] In some embodiments, the polarity recognition model is obtained by randomly masking the second sample image to obtain a masked image, and then training based on the second sample image and the masked image.
[0029] In some embodiments, the polarity recognition model is obtained by randomly masking the second sample image to obtain a masked region, blurring the masked region to obtain a masked image, and training based on the second sample image and the masked image. The blurring process includes Gaussian blurring and / or median blurring.
[0030] Secondly, embodiments of this disclosure provide a model training method, including:
[0031] Obtain a first sample dataset, wherein the first sample dataset includes a first sample image, and the first sample image is an inverted image;
[0032] A non-polarity recognition model is trained based on the first sample dataset. The non-polarity recognition model is used to identify the chip component to be identified if the polarity attribute of the chip component to be identified is non-polarity, and then to obtain the identification result.
[0033] In some embodiments, the first sample image includes descriptive text of a non-polar chip component; training a non-polarity recognition model based on the first sample dataset includes:
[0034] A mapping relationship is constructed based on the descriptive text in the first sample image, wherein the mapping relationship is used to characterize the correspondence between inverted text and characters;
[0035] The nonpolar recognition model is trained based on the first sample image and the mapping relationship.
[0036] In some embodiments, the nonpolarity recognition model is trained based on the first sample image and the mapping relationship, including:
[0037] Predict the characters of the descriptive text in the first sample image based on a preset basic network model;
[0038] The basic network model is trained based on the predicted character and the mapping relationship to obtain the polarity-free recognition model.
[0039] In some embodiments, the basic network model is trained based on the predicted character and the mapping relationship to obtain the non-polarity recognition model, including:
[0040] The real characters of the descriptive text in the first sample image are determined based on the mapping relationship;
[0041] The difference information between the predicted character and the real character is calculated, and the model parameters of the basic network model are adjusted according to the difference information to obtain the polarity-free recognition model.
[0042] In some embodiments, obtaining the first sample dataset includes:
[0043] Acquire images of nonpolar chip components;
[0044] An inverted image is obtained from the image of the nonpolar chip component, and the first sample dataset is constructed based on the inverted image.
[0045] Thirdly, embodiments of this disclosure provide a chip component identification device, comprising:
[0046] The first acquisition unit is used to acquire the polarity attribute of the chip component to be identified, wherein the polarity attribute is either polarized or non-polarized.
[0047] The calling unit is used to call an identification method for identifying the chip component to be identified according to the polarity attribute, wherein the identification methods corresponding to polarity and non-polarity are different.
[0048] The identification unit is used to identify the chip component to be identified according to the called identification method, and obtain the identification result.
[0049] In some embodiments, if the polarity attribute is non-polar, the identification unit includes:
[0050] The first acquisition subunit is used to acquire the image of the chip component to be identified;
[0051] The first recognition subunit is used to perform recognition processing on the inverted image based on a preset mapping relationship if the image to be recognized is an inverted image, and obtain the recognition result, wherein the mapping relationship is used to characterize the correspondence between inverted text and characters.
[0052] In some embodiments, the first identification subunit includes:
[0053] The acquisition module is used to acquire, if the image to be identified is an inverted image, the inverted descriptive text of the chip component to be identified in the inverted image;
[0054] The determining module is used to determine the character corresponding to the inverted description text according to the mapping relationship, and to determine the recognition result based on the determined character corresponding to the inverted description text.
[0055] In some embodiments, the determining module is used to perform reverse mapping processing on the characters corresponding to the inverted descriptive text, based on the mapping relationship, to obtain the recognition result.
[0056] In some embodiments, the calling unit is used to call the non-polarity recognition model;
[0057] And, the identification unit is used to perform identification processing on the chip component to be identified based on the non-polarity identification model to obtain the identification result;
[0058] The non-polarity recognition model is trained based on a first sample dataset, which includes a first sample image, which is an inverted image, and includes descriptive text of non-polarity chip components.
[0059] In some embodiments, if the polarity attribute is polar, the identification unit includes:
[0060] The second acquisition subunit is used to acquire the image of the chip component to be identified;
[0061] The processing subunit is used to perform image enhancement processing on the image to be identified to obtain an enhanced image;
[0062] The second recognition subunit is used to perform recognition processing on the enhanced image to obtain the recognition result.
[0063] In some embodiments, if the polarity attribute is polar, the calling unit is used to call the polarity recognition model;
[0064] And, the identification unit is used to perform identification processing on the chip component to be identified based on the polarity identification model, and obtain the identification result;
[0065] The polarity recognition model is trained based on a second sample dataset, which includes second sample images and descriptive text for polarized chip components.
[0066] In some embodiments, the polarity recognition model is obtained by performing image enhancement processing on the second sample image and training it based on the second sample image and the enhanced image.
[0067] In some embodiments, the polarity recognition model is obtained by randomly masking the second sample image to obtain a masked image, and then training based on the second sample image and the masked image.
[0068] In some embodiments, the polarity recognition model is obtained by randomly masking the second sample image to obtain a masked region, blurring the masked region to obtain a masked image, and training based on the second sample image and the masked image. The blurring process includes Gaussian blurring and / or median blurring.
[0069] Fourthly, embodiments of this disclosure provide a model training apparatus, comprising:
[0070] The second acquisition unit is used to acquire a first sample dataset, wherein the first sample dataset includes a first sample image, and the first sample image is an inverted image;
[0071] The training unit is used to train a non-polarity recognition model based on the first sample dataset. The non-polarity recognition model is used to perform recognition processing on the chip component to be identified if the polarity attribute of the chip component to be identified is non-polarity, and to obtain the recognition result.
[0072] In some embodiments, the first sample image includes descriptive text for non-polar chip components; the training unit includes:
[0073] A subunit is constructed to construct a mapping relationship based on the descriptive text in the first sample image, wherein the mapping relationship is used to characterize the correspondence between inverted text and characters;
[0074] The training subunit is used to train the nonpolar recognition model based on the first sample image and the mapping relationship.
[0075] In some embodiments, the training subunit includes:
[0076] The prediction module is used to predict the characters of the descriptive text in the first sample image based on a preset basic network model;
[0077] The training module is used to train the basic network model based on the predicted character and the mapping relationship to obtain the polarity-free recognition model.
[0078] In some embodiments, the training module includes:
[0079] A determination submodule is used to determine the real characters of the descriptive text in the first sample image based on the mapping relationship;
[0080] The calculation submodule is used to calculate the difference information between the predicted character and the real character;
[0081] The adjustment submodule is used to adjust the model parameters of the basic network model according to the difference information to obtain the polarity-free recognition model.
[0082] In some embodiments, the second acquisition unit includes:
[0083] The third acquisition subunit is used to acquire an image of a non-polar chip component and acquire an inverted image from the image of the non-polar chip component;
[0084] A sub-unit is constructed to construct the first sample dataset based on the inverted image.
[0085] Fifthly, embodiments of this disclosure provide an electronic device, including: a memory and a processor;
[0086] Memory; memory for storing executable instructions of the processor;
[0087] The processor is configured to perform the method as described in the first or second aspect.
[0088] In a sixth aspect, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the method as described in the first or second aspect.
[0089] In a seventh aspect, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the method according to the first or second aspect.
[0090] The chip component identification method, model training method, and apparatus provided in this disclosure improve the diversity and flexibility of chip component identification processing by acquiring the polarity attribute of the chip component to be identified and calling the identification method corresponding to the polarity attribute to identify the chip component. This also makes the chip component identification processing more targeted, thereby improving the effectiveness and reliability of the identification processing and ultimately achieving the technical effect of improving the accuracy of the determined identification results. Attached Figure Description
[0091] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0092] Figure 1 This is a schematic diagram of a chip component in one embodiment;
[0093] Figure 2 This is a schematic diagram of chip components according to another embodiment;
[0094] Figure 3 This is a schematic diagram of a chip component identification method according to an embodiment of the present disclosure;
[0095] Figure 4 This is a schematic diagram of a chip component identification method according to another embodiment of the present disclosure;
[0096] Figure 5 This is a schematic diagram of a chip component identification method according to another embodiment of the present disclosure;
[0097] Figure 6 This is a schematic diagram of chip components according to another embodiment;
[0098] Figure 7 This is a schematic diagram of a model training method according to an embodiment of the present disclosure;
[0099] Figure 8 This is a schematic diagram of a chip component identification device according to an embodiment of the present disclosure;
[0100] Figure 9 This is a schematic diagram of a model training apparatus according to an embodiment of the present disclosure;
[0101] Figure 10 This is a block diagram of an electronic device based on the chip component identification method and model training method according to embodiments of the present disclosure.
[0102] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0103] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0104] Chip components are used to form integrated circuits. Based on whether they are polarized, chip components can be divided into polarized chip components and non-polarized chip components.
[0105] In related technologies, the same identification method is typically used to identify both polarized and non-polarized chip components. That is, when identifying chip components, it is not necessary to distinguish whether the chip component is polarized or non-polarized.
[0106] For example, the following methods can be used to identify chip components:
[0107] In one example, the string of the chip component can be obtained, the obtained string can be split to get individual characters, and the individual characters can be matched with a preset character template to obtain the recognition result of the chip component, that is, to obtain the text content of the chip component.
[0108] However, due to the complex background of chip components and the potentially low contrast of their images, such as... Figure 1 As shown, the above method makes it difficult to segment individual characters, resulting in low recognition accuracy.
[0109] In another example, chip components can be identified using deep learning algorithms, such as encoder-decoder networks and the Connectionist Temporal Classification (CTC) algorithm of neural networks, to obtain the identification results of the chip components.
[0110] However, due to the possibility that chip components may be reversed, such as Figure 2 As shown, the above method cannot achieve accurate identification.
[0111] In some embodiments, an orientation recognition model can be trained based on the above examples to identify chip components.
[0112] However, on the one hand, training the orientation recognition model requires time and cost, and during the recognition process, the addition of the orientation recognition model will increase the recognition processing time, which relatively reduces the recognition efficiency, and will also relatively increase the risk of recognition errors, thus reducing the accuracy of recognition.
[0113] In order to avoid at least one of the above-mentioned technical problems, the inventors of this disclosure have obtained the inventive concept of this disclosure through creative work: to obtain the polarity attribute of the chip component to be identified, to call different identification methods according to different polarity attributes, and to perform identification processing on the chip component to be identified based on the called identification method.
[0114] The technical solutions of this disclosure and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this disclosure will now be described with reference to the accompanying drawings.
[0115] Please see Figure 3 , Figure 3 This is a schematic diagram of a chip component identification method according to an embodiment of the present disclosure, including:
[0116] S301: Obtain the polarity attribute of the chip component to be identified.
[0117] Among them, the polarity attribute is either polar or non-polar.
[0118] For example, the execution subject of this embodiment is a chip component identification device (hereinafter referred to as identification device). The identification device can be a server (such as a cloud server, a local server, or a server cluster), a terminal device, a computer, a processor, a chip, etc. This embodiment does not limit the scope.
[0119] Based on the above analysis, chip components have polarity attributes, such as being polarized or non-polarized. Therefore, the chip components to be identified also have polarity attributes, such as being used to characterize the chip components to be identified as polarized chip components, or being used to characterize the chip components to be identified as inorganic chip components.
[0120] This embodiment does not limit the method of obtaining polarity attributes. For example, when deploying the chip component to be identified, if the chip component to be identified needs to be deployed in a certain insertion method, it means that the polarity attribute of the chip component to be identified is polarized; conversely, if the chip component to be identified can be deployed in a way that allows for arbitrary insertion, it means that the polarity attribute of the chip component to be identified is non-polarized.
[0121] S302: Invoke the identification method for identifying the chip component to be identified based on the polarity attribute.
[0122] The identification methods for polarity and non-polarity are different.
[0123] For example, there are two methods for identifying chip components: one is a method for identifying polarized chip components, and the other is a method for identifying non-polarized chip components.
[0124] Correspondingly, if the chip component to be identified is a polarized chip component, the method for identifying polarized chip components is invoked to perform identification processing on the chip component to be identified based on the identification method; if the chip component to be identified is a non-polarized chip component, the method for identifying non-polarized chip components is invoked to perform identification processing on the chip component to be identified based on the identification method.
[0125] One method for identifying polarized chip components is to analyze the polarized chip components, obtain their common characteristics, and generate a model based on these common characteristics.
[0126] Correspondingly, a method for identifying non-polar chip components can be to analyze the non-polar chip components, obtain their common characteristics, and generate a model based on these common characteristics.
[0127] S303: The chip component to be identified is processed according to the called identification method to obtain the identification result.
[0128] Based on the above analysis, this disclosure provides a method for identifying chip components, including: acquiring the polarity attribute of the chip component to be identified, wherein the polarity attribute is either polarized or non-polarized; calling an identification method for identifying the chip component to be identified according to the polarity attribute, wherein the identification methods corresponding to polarity and non-polarity are different; and performing identification processing on the chip component to be identified according to the called identification method to obtain an identification result. In this embodiment, by acquiring the polarity attribute of the chip component to be identified and calling the identification method corresponding to the polarity attribute to perform identification processing on the chip component to be identified, the technical feature of improving the diversity and flexibility of chip component identification processing is enhanced, and the identification processing of chip components is made more targeted, thereby improving the effectiveness and reliability of the identification processing, and ultimately achieving the technical effect of improving the accuracy of the determined identification result.
[0129] Please see Figure 4 , Figure 4 This is a schematic diagram of a chip component identification method according to another embodiment of the present disclosure, including:
[0130] S401: Obtain the polarity attribute of the chip component to be identified.
[0131] Among them, the polarity attribute is either polar or non-polar.
[0132] It should be understood that, in order to avoid tedious descriptions, this embodiment does not limit the technical features that are the same as those in the above embodiments.
[0133] S402: If the polarity attribute is non-polar, then obtain the image of the chip component to be identified.
[0134] In other embodiments, the image of the chip component to be identified can also be obtained when the polarity attribute of the chip component to be identified is obtained.
[0135] Alternatively, one can first obtain the image of the chip component to be identified, and then obtain the polarity attribute of the chip component to be identified.
[0136] In other words, this embodiment does not limit the order in which the polarity attribute and the image to be identified are acquired. However, in order to facilitate the determination of which identification method to use for the chip component to be identified, the polarity attribute can be determined first, and then the image to be identified can be acquired.
[0137] This embodiment does not limit the method of acquiring the image to be recognized, for example:
[0138] In one example, the recognition device can be connected to an image acquisition device and receive the image to be recognized sent by the image acquisition device.
[0139] In another example, the recognition device can provide a tool for loading images, which the user can use to transfer the image to be recognized to the recognition device.
[0140] The tool for loading images can be an interface for connecting to external devices, such as an interface for connecting to other storage devices, through which the image to be recognized transmitted by the external device can be obtained; the tool for loading images can also be a display device, such as a recognition device that can input an interface for loading images on the display device, through which the user can import the image to be recognized into the recognition device, and the recognition device can obtain the imported image to be recognized.
[0141] S403: If the image to be identified is an inverted image, then the inverted image is identified based on a preset mapping relationship to obtain the identification result.
[0142] The mapping relationship is used to represent the correspondence between inverted text and characters.
[0143] For example, after determining that the chip component to be identified is a non-polarized chip component and obtaining the image to be identified, it can be determined whether the image to be identified is an inverted image. If the determination result is that the image to be identified is... Figure 2 The inverted image shown is then processed for recognition based on the mapping relationship.
[0144] In this embodiment, a mapping relationship can be pre-constructed to represent the correspondence between inverted text and characters. Based on this mapping relationship, the inverted image can be identified to obtain the character corresponding to the inverted image, and thus obtain the recognition result.
[0145] Based on the above analysis, it can be seen that in some embodiments, an orientation recognition model can be trained to identify inverted images. However, this method may reduce recognition efficiency and accuracy, and requires time and resources for training. In this embodiment, by combining mapping relationships to identify inverted images, recognition efficiency can be improved, resources can be saved, and the accuracy and reliability of recognition can be improved.
[0146] In some embodiments, S403 may include the following steps:
[0147] First step: If the image to be identified is an upside-down image, then obtain the upside-down description text of the chip component to be identified in the upside-down image.
[0148] The descriptive text refers to the text that describes the chip components, such as... Figure 2 The text shown describes the types of chip components as diodes, etc.
[0149] In this embodiment, since the chip component to be identified is an upside-down chip component, and its image to be identified is an upside-down image, the obtained text used to describe the chip component to be identified is upside-down text (i.e., upside-down descriptive text).
[0150] The second step is to determine the characters corresponding to the inverted descriptive text based on the mapping relationship, and then determine the recognition result based on the determined characters corresponding to the inverted descriptive text.
[0151] Based on the above analysis, the mapping relationship represents the correspondence between inverted text and characters. Therefore, after obtaining the inverted descriptive text, the characters that correspond to the inverted descriptive text can be determined from this mapping relationship.
[0152] For example, in the mapping relationship, "inverted A" corresponds to the character "!". If the inverted description text includes "inverted A", then the character "!" corresponding to "inverted A" can be determined.
[0153] It should be understood that the above mapping relationship is for illustrative purposes only and should not be construed as a limitation on the mapping relationship. In some embodiments, the mapping relationship can be constructed based on requirements, historical records, and experiments, etc., and this embodiment does not impose any limitations.
[0154] In this embodiment, by determining the inverted description text, the recognition result is determined by combining the mapping relationship and the inverted description text. This avoids the drawbacks of resource consumption and reduced efficiency caused by training the orientation recognition model in the above embodiment and performing identification processing on the chip components to be identified based on the orientation recognition model. This improves the efficiency and reliability of the identification processing of the chip components to be identified.
[0155] In some embodiments, determining the recognition result based on the characters corresponding to the inverted descriptive text includes: performing reverse mapping processing on the characters corresponding to the inverted descriptive text according to the mapping relationship to obtain the recognition result.
[0156] For example, based on the above analysis, if the character corresponding to the inverted descriptive text is "!", then by performing reflection processing according to the mapping relationship, it can be obtained that the non-inverted descriptive text includes "A", thereby determining the recognition result.
[0157] Combination Figure 2 As shown, the inverted description text includes multiple characters (such as...). Figure 2 The letters and numbers shown can be used to determine the character corresponding to each character based on the mapping relationship. Each character is then reverse-mapped to obtain the non-inverted character corresponding to each character. The non-inverted characters are then concatenated to obtain the recognition result.
[0158] In other embodiments, in addition to determining the identification result of the chip component to be identified using the above method, the identification result of the chip component to be identified can also be determined by using a model.
[0159] For example, a non-polarity recognition model can be pre-built for identifying chip components with non-polarity attributes. When it is determined that the polarity attribute of the chip component to be identified is non-polarity, the non-polarity recognition model can be called to determine the identification result of the chip component to be identified based on the non-polarity recognition model.
[0160] The non-polarity recognition model is trained based on the first sample dataset, which includes the first sample image, which is an inverted image, and includes descriptive text of non-polarity chip components.
[0161] It should be understood that the "first" in the first sample dataset is used to distinguish it from other sample datasets, such as to distinguish it from the second sample dataset mentioned later, and should not be interpreted as a limitation on the first sample dataset.
[0162] Similarly, the word "first" in the first sample image is used to distinguish it from other sample images, such as to distinguish it from the second sample image mentioned later, and should not be interpreted as a limitation on the first sample image.
[0163] The number of the first sample images can be determined based on demand, historical records, and experiments, and this embodiment does not impose any limitations.
[0164] For example, for scenarios with relatively high accuracy, the number of first sample images can be relatively large, while for scenarios with relatively low accuracy, the number of first sample images can be relatively small.
[0165] In other words, multiple inverted images of non-polar chip components can be obtained. Each inverted image includes descriptive text used to describe the non-polar chip component. This descriptive text is inverted text. A first sample dataset is constructed based on the inverted images of each non-polar chip component, and a non-polarity recognition model is trained based on the first sample dataset.
[0166] This embodiment does not limit the method of training the non-polarity recognition model based on the first sample dataset. For example, the basic network model can be trained based on the first sample dataset to obtain the non-polarity recognition model, and the framework and structure of the basic network model are not limited in this embodiment.
[0167] It is worth noting that in this embodiment, a non-polarity recognition model is obtained by training an inverted image of the descriptive text of the non-polarity chip component. When the polarity attribute of the chip component to be identified is determined to be non-polarity, the non-polarity recognition model is called to identify the chip component to be identified and obtain the identification result. This can achieve targeted identification processing of non-polarity chip components, thereby improving the technical effect of improving the accuracy and reliability of the identification processing.
[0168] Based on the above analysis, the result of determining whether the image to be identified is an inverted image may be that the image to be identified is an inverted image, as in the above embodiment, or it may be that the image to be identified is not an inverted image.
[0169] For example, if the determination result is that the image to be recognized is not an inverted image, that is, a normally displayed image, then technologies such as Optical Character Recognition (OCR) can be used to process the image to be recognized, thereby obtaining the recognition result.
[0170] Please see Figure 5 , Figure 5 This is a schematic diagram of a chip component identification method according to another embodiment of the present disclosure, including:
[0171] S501: Obtain the polarity attribute of the chip component to be identified.
[0172] Among them, the polarity attribute is either polar or non-polar.
[0173] Similarly, to avoid tedious descriptions, this embodiment does not limit the technical features that are the same as those in the above embodiments.
[0174] S502: If the polarity attribute is polarized, then obtain the image of the chip component to be identified.
[0175] S503: Perform image enhancement processing on the image to be recognized to obtain an enhanced image, and perform recognition processing on the enhanced image to obtain the recognition result.
[0176] In this embodiment, if the polarity attribute of the chip component to be identified is polarized, then the image to be identified is a non-inverted image, that is, a normally displayed image. In this case, image enhancement processing can be performed on the image to be identified to avoid problems such as low contrast and blurriness. That is, the enhanced image is clearer than the image to be identified. Therefore, performing recognition processing on the enhanced image can improve the reliability and accuracy of the recognition processing, thereby making the recognition result have a high degree of accuracy and reliability.
[0177] In other embodiments, a model-based approach can be used to process the image to be recognized in order to obtain the recognition result.
[0178] For example, a polarity recognition model can be pre-built for identifying chip components with polarity attributes. When it is determined that the polarity attribute of the chip component to be identified is polar, the polarity recognition model can be invoked to determine the identification result of the chip component to be identified based on the polarity recognition model.
[0179] Among them, the polarity recognition model is trained based on the second sample dataset, which includes second sample images, and the second sample images include descriptive text of polarized chip components.
[0180] Similarly, the number of second sample images can be determined based on demand, historical records, and experiments, and this embodiment does not impose any limitations.
[0181] In other words, multiple images of polarized chip components can be obtained, i.e., multiple second sample images. Each second sample image includes descriptive text for describing the polarized chip components. A second sample dataset is constructed based on the second sample images of each polarized chip component, and a polarity recognition model is trained based on the second sample dataset.
[0182] This embodiment does not limit the method of training the polarity recognition model based on the second sample dataset. For example, the basic network model can be trained based on the second sample dataset to obtain the polarity recognition model, and the framework and structure of the basic network model are not limited in this embodiment.
[0183] Similarly, in this embodiment, a polarity recognition model is trained by combining a second sample image containing descriptive text of polarized chip components. When the polarity attribute of the chip component to be identified is determined to be polarized, the polarity recognition model is called to perform recognition processing on the chip component to be identified and obtain the recognition result. This can achieve targeted recognition processing of polarized chip components, thereby improving the technical effect of improving the accuracy and reliability of recognition processing.
[0184] In some embodiments, training a polarity recognition model may include the following steps:
[0185] First step: Obtain the second sample image and perform image enhancement processing on the second sample image to obtain the enhanced image.
[0186] In this embodiment, the method of image enhancement is not limited. For example, geometric transformation can be used to enhance the second sample image to obtain the enhanced image; or color transformation can be used to enhance the second sample image to obtain the enhanced image, and so on. These will not be listed here.
[0187] Furthermore, geometric transformations are used to enhance the second sample image. Specifically, methods such as flipping, rotating, cropping, deforming, and scaling can be used to enhance the second sample image to obtain the enhanced image.
[0188] The second step: Train a polarity recognition model based on the second sample image and the enhanced image.
[0189] Based on the above analysis, the second sample image is the image before image enhancement processing. In other words, in this embodiment, the images before and after image enhancement processing are used as the second sample dataset. A polarity recognition model is trained based on this second sample dataset, which enables the polarity recognition model to have strong discrimination ability. This allows for accurate recognition even when the text in the image of the chip component to be recognized is blurry, thereby improving the accuracy and reliability of the recognition result.
[0190] In other embodiments, training a polarity recognition model may include the following steps:
[0191] First step: Obtain the second sample image, perform random masking on the second sample image, and obtain the masked image.
[0192] The second step: Based on the second sample image and the image after masking, a polarity recognition model is trained.
[0193] The random masking process refers to randomly masking a portion of the second sample image to enable the polarity recognition model to have a strong recognition capability. Even when a portion of the image of the chip component to be identified is blurred, the recognition result of the chip component to be identified, i.e., the text content of the chip component to be identified, can be determined relatively accurately.
[0194] In some embodiments, performing random masking on the second sample image to obtain a masked image may include: performing random masking on the second sample image to obtain a masked region, and blurring the masked region to obtain a masked image.
[0195] The blurring process includes Gaussian blurring and / or median blurring.
[0196] For example, if the second sample image is like Figure 6 As shown, the text content (or label) of the second sample image can be obtained, namely "AS431A". The number of characters to be randomly masked can be predetermined (it can be a fixed value), or the number of characters to be randomly masked can be determined according to the length of the text content.
[0197] It can predict the width of each character, such as the width of "A", and determine the width of the character as the width of the mask area. Furthermore, the width of the mask area can be determined by dividing the length of the second sample image by the total number of characters in the text content.
[0198] Different mask regions can be obtained by randomly initializing the starting position of the mask region. For example, the mask region can be the region where "A" is located, or the region where "S" is located, etc., which will not be listed here.
[0199] The masked region can be subjected to Gaussian blur, median blur, or a combination of Gaussian blur and median blur to obtain the masked image.
[0200] Among them, Gaussian blur processing, also known as Gaussian smoothing processing, is used to reduce image noise and reduce detail levels. In this embodiment, it is used to reduce image noise and reduce detail levels in the mask area.
[0201] Median blurring, also known as median filtering, is a non-linear smoothing technique that sets the gray value of each pixel to the median of the gray values of all pixels within a certain neighborhood window. In this embodiment, it is used to set the gray values of pixels in the mask region to the median of the gray values of the regions adjacent to the mask region.
[0202] Of course, in other embodiments, other methods can be used to blur the mask region, such as mean filtering and bilateral filtering, which will not be listed here.
[0203] In this embodiment, the masked image is determined by random masking and blurring. The polarity recognition model is constructed by combining the masked image with the polarity recognition model, which can improve the recognition performance of the polarity recognition model. Therefore, when the image of the chip component to be identified is processed based on the polarity recognition model, the accuracy and reliability of the recognition process can be improved.
[0204] Based on the above analysis, in some embodiments, a polarity recognition model for identifying polarized chip components and a non-polarity recognition model for identifying non-polarized chip components can be pre-constructed. This allows for the determination of the polarity attribute of a chip component before identification, i.e., whether it is a polarized or non-polarized component. If the chip component is polarized, the polarity recognition model is invoked for identification; if it is non-polarized, the non-polarity recognition model is invoked, thereby improving the flexibility and versatility of chip component identification.
[0205] In the above embodiments, the construction of a polarity recognition model was described in detail. Now, in conjunction with... Figure 7 The possible methods for constructing a polarity-free recognition model are described.
[0206] Please see Figure 7 , Figure 7 This is a schematic diagram of a model training method according to an embodiment of the present disclosure.
[0207] like Figure 7 As shown, the method includes:
[0208] S701: Obtain the first sample dataset.
[0209] The first sample dataset includes a first sample image, which is an inverted image.
[0210] Similarly, to avoid tedious descriptions, this embodiment does not limit the technical features that are the same as those in the above embodiments.
[0211] In some embodiments, S701 may include the following steps:
[0212] First step: Obtain images of non-polar chip components.
[0213] The second step is to obtain inverted images from images of non-polar chip components and construct the first sample dataset based on the inverted images.
[0214] S702: A polarity-free recognition model is trained based on the first sample dataset.
[0215] Among them, the non-polarity recognition model is used to identify chip components whose polarity attribute is non-polarity, and then to perform recognition processing on the chip components to be identified to obtain the recognition result.
[0216] In some embodiments, the first sample image includes descriptive text for a non-polar chip component; S702 may include the following steps:
[0217] First step: Construct a mapping relationship based on the descriptive text in the first sample image.
[0218] The mapping relationship is used to represent the correspondence between inverted text and characters.
[0219] The second step: Based on the first sample image and the mapping relationship, a polarity-free recognition model is trained.
[0220] For example, based on the above analysis, if the first sample image is an inverted image, then the text in the first sample image used to describe the non-polar chip component is inverted text. Therefore, in this embodiment, a mapping relationship can be constructed based on the descriptive text (i.e., inverted text) in the first sample image.
[0221] In some embodiments, the second step may include sub-steps:
[0222] First sub-step: Predict the characters of the descriptive text in the first sample image based on the preset basic network model.
[0223] In this embodiment, the type and structure of the base network model are not limited. For example, the base network model can be a convolutional neural network (CRNN), and to reduce the training time, a lightweight network (MobileNet V3) of the neural network model (backbone) can be used, while the CTC algorithm can be used for decoding.
[0224] The second sub-step involves training the basic network model based on the predicted characters and mapping relationships to obtain a polarity-free recognition model.
[0225] For example, the real characters of the descriptive text in the first sample image can be determined according to the mapping relationship, and the difference information between the predicted characters and the real characters can be calculated. The model parameters of the basic network model can then be adjusted according to the difference information to obtain a polarity-free recognition model.
[0226] Please see Figure 8 , Figure 8 This is a schematic diagram of a chip component identification device according to an embodiment of the present disclosure.
[0227] like Figure 8 As shown, the chip component identification device 800 includes:
[0228] The first acquisition unit 801 is used to acquire the polarity attribute of the chip component to be identified, wherein the polarity attribute is either polarized or non-polarized.
[0229] The calling unit 802 is used to call an identification method for identifying the chip component to be identified according to the polarity attribute, wherein the identification methods corresponding to polarity and non-polarity are different.
[0230] The identification unit 803 is used to identify the chip component to be identified according to the called identification method and obtain the identification result.
[0231] In some embodiments, if the polarity attribute is non-polar, combined with Figure 8 As shown, the identification unit 803 includes:
[0232] The first acquisition subunit 8031 is used to acquire the image of the chip component to be identified.
[0233] The first recognition subunit 8032 is used to perform recognition processing on the inverted image based on a preset mapping relationship if the image to be recognized is an inverted image, and obtain the recognition result, wherein the mapping relationship is used to characterize the correspondence between inverted text and characters.
[0234] In some embodiments, the first identification subunit 8032 includes:
[0235] The acquisition module is used to acquire, if the image to be identified is an inverted image, the inverted description text of the chip component to be identified in the inverted image.
[0236] The determining module is used to determine the character corresponding to the inverted description text according to the mapping relationship, and to determine the recognition result based on the determined character corresponding to the inverted description text.
[0237] In some embodiments, the determining module is used to perform reverse mapping processing on the characters corresponding to the inverted descriptive text, based on the mapping relationship, to obtain the recognition result.
[0238] In some embodiments, the calling unit 802 is used to call the non-polarity recognition model.
[0239] Furthermore, the identification unit 803 is used to perform identification processing on the chip component to be identified based on the non-polarity identification model to obtain the identification result.
[0240] The non-polarity recognition model is trained based on a first sample dataset, which includes a first sample image, which is an inverted image, and includes descriptive text of non-polarity chip components.
[0241] In some embodiments, if the polarity attribute is polar, combined with Figure 8 As shown, the identification unit 803 includes:
[0242] The second acquisition subunit 8033 is used to acquire the image of the chip component to be identified;
[0243] The processing subunit 8034 is used to perform image enhancement processing on the image to be identified to obtain an enhanced image;
[0244] The second recognition subunit 8035 is used to perform recognition processing on the enhanced image to obtain the recognition result.
[0245] In some embodiments, if the polarity attribute is polar, the calling unit 802 is used to call the polarity recognition model.
[0246] Furthermore, the identification unit 803 is used to perform identification processing on the chip component to be identified based on the polarity identification model to obtain the identification result.
[0247] The polarity recognition model is trained based on a second sample dataset, which includes second sample images and descriptive text for polarized chip components.
[0248] In some embodiments, the polarity recognition model is obtained by performing image enhancement processing on the second sample image and training it based on the second sample image and the enhanced image.
[0249] In some embodiments, the polarity recognition model is obtained by randomly masking the second sample image to obtain a masked image, and then training based on the second sample image and the masked image.
[0250] In some embodiments, the polarity recognition model is obtained by randomly masking the second sample image to obtain a masked region, blurring the masked region to obtain a masked image, and training based on the second sample image and the masked image. The blurring process includes Gaussian blurring and / or median blurring.
[0251] Please see Figure 9 , Figure 9 This is a schematic diagram of a model training apparatus according to an embodiment of the present disclosure.
[0252] like Figure 9 As shown, the model training device 900 includes:
[0253] The second acquisition unit 901 is used to acquire a first sample dataset, wherein the first sample dataset includes a first sample image, and the first sample image is an inverted image.
[0254] In some embodiments, combined with Figure 9 As shown, the second acquisition unit 901 includes:
[0255] The third acquisition subunit 9011 is used to acquire an image of a non-polar chip component and acquire an inverted image from the image of the non-polar chip component;
[0256] Subunit 9012 is constructed to construct the first sample dataset based on the inverted image.
[0257] Training unit 902 is used to train a non-polarity recognition model based on the first sample dataset. The non-polarity recognition model is used to identify the chip component to be identified if the polarity attribute of the chip component to be identified is non-polarity, and then to obtain the identification result.
[0258] In some embodiments, the first sample image includes descriptive text for non-polar chip components; combined with Figure 9 As shown, the training unit 902 includes:
[0259] A subunit 9021 is constructed to construct a mapping relationship based on the descriptive text in the first sample image, wherein the mapping relationship is used to characterize the correspondence between inverted text and characters;
[0260] Training subunit 9022 is used to train the nonpolar recognition model based on the first sample image and the mapping relationship.
[0261] In some embodiments, the training subunit 9022 includes:
[0262] The prediction module is used to predict the characters of the descriptive text in the first sample image based on a preset basic network model.
[0263] The training module is used to train the basic network model based on the predicted character and the mapping relationship to obtain the polarity-free recognition model.
[0264] In some embodiments, the training module includes:
[0265] A determination submodule is used to determine the real characters of the descriptive text in the first sample image based on the mapping relationship;
[0266] The calculation submodule is used to calculate the difference information between the predicted character and the real character;
[0267] The adjustment submodule is used to adjust the model parameters of the basic network model according to the difference information to obtain the polarity-free recognition model.
[0268] According to embodiments of this disclosure, this disclosure also provides an electronic device and a readable storage medium.
[0269] According to embodiments of this disclosure, this disclosure also provides a computer program product, the program product comprising: a computer program stored in a readable storage medium, at least one processor of an electronic device being able to read the computer program from the readable storage medium, and the at least one processor executing the computer program causing the electronic device to perform the scheme provided in any of the above embodiments.
[0270] like Figure 10 The diagram shown is a block diagram of an electronic device for identifying chip components and training models according to embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0271] like Figure 10 As shown, the electronic device includes one or more processors 1001, a memory 1002, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components are interconnected via different buses and can be mounted on a common motherboard or otherwise as required. The processors can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple electronic devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 10 Take processor 1001 as an example.
[0272] The memory 1002 is the non-transitory computer-readable storage medium provided in this disclosure. The memory stores instructions executable by at least one processor to cause the at least one processor to perform the chip component identification method and model training method provided in this disclosure. The non-transitory computer-readable storage medium of this disclosure stores computer instructions for causing a computer to perform the chip component identification method and model training method provided in this disclosure.
[0273] The memory 1002, 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 chip component identification method and model training method in the embodiments of this disclosure. The processor 1001 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions, and modules stored in the memory 1002, thereby implementing the chip component identification method and model training method in the above method embodiments.
[0274] The memory 1002 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the use of the electronic device based on the chip component identification method and model training method. Furthermore, the memory 1002 may include high-speed random access memory and may also include non-transient memory, such as at least one disk storage device, flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 1002 may optionally include memory remotely located relative to the processor 1001. These remote memories can be connected to the electronic device using the chip component identification method and model training method via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0275] The electronic device for identifying chip components and training models may further include an input device 1003 and an output device 1004. The processor 1001, memory 1002, input device 1003, and output device 1004 can be connected via a bus or other means. Figure 10 Taking the example of a connection between China and Israel via a bus.
[0276] Input device 1003 can receive input digital or character information, as well as key signal inputs related to user settings and function control of electronic devices for chip component identification methods and model training methods, such as touch screens, keypads, mice, trackpads, touchpads, pointers, one or more mouse buttons, trackballs, joysticks, etc. Output device 1004 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The display device may include, but is not limited to, liquid crystal displays (LCDs), light-emitting diode (LED) displays, and plasma displays. In some embodiments, the display device may be a touch screen.
[0277] Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, application-specific integrated circuits (ASICs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.
[0278] These computational programs (also referred to as programs, software, software applications, or code) include machine instructions for a programmable processor and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms “machine-readable medium” and “computer-readable medium” refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) used to provide machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term “machine-readable signal” refers to any signal used to provide machine instructions and / or data to a programmable processor.
[0279] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0280] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0281] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.
[0282] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0283] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for identifying chip components, comprising: Obtain the polarity attribute of the chip component to be identified, wherein the polarity attribute is either polarized or non-polarized; The identification method for identifying the chip component to be identified is invoked according to the polarity attribute, wherein the identification methods corresponding to polarity and non-polarity are different; The chip component to be identified is identified according to the called identification method to obtain the identification result; If the polarity attribute is non-polar, then the chip component to be identified is identified according to the called identification method to obtain the identification result, including: Obtain the image of the chip component to be identified; If the image to be identified is an inverted image, then obtain the inverted description text of the chip component to be identified in the inverted image; The characters corresponding to the inverted descriptive text are determined according to a preset mapping relationship, and the determined characters corresponding to the inverted descriptive text are then subjected to inverse mapping processing according to the mapping relationship to obtain the recognition result. The mapping relationship is used to characterize the correspondence between the inverted text and the characters; and / or If the polarity attribute is non-polar, then the identification method for identifying the chip component to be identified is invoked according to the polarity attribute, including: invoking the non-polarity identification model; In addition, the chip component to be identified is identified according to the called identification method to obtain the identification result, including: the chip component to be identified is identified based on the non-polarity identification model to obtain the identification result; The non-polarity recognition model is trained based on a first sample dataset, which includes a first sample image, which is an inverted image, and includes descriptive text of non-polarity chip components.
2. The method according to claim 1, wherein, If the polarity attribute is polarized, then the chip component to be identified is identified according to the called identification method to obtain the identification result, including: Obtain the image of the chip component to be identified; The image to be identified is subjected to image enhancement processing to obtain an enhanced image, and the enhanced image is subjected to recognition processing to obtain the recognition result.
3. The method according to claim 1, wherein, If the polarity attribute is polarized, then the identification method for identifying the chip component to be identified is invoked according to the polarity attribute, including: invoking the polarized identification model; In addition, the chip component to be identified is identified according to the called identification method to obtain the identification result, including: the chip component to be identified is identified based on the polarity identification model to obtain the identification result; The polarity recognition model is trained based on a second sample dataset, which includes second sample images and descriptive text for polarized chip components.
4. The method according to claim 3, wherein, The polarity recognition model is obtained by performing image enhancement processing on the second sample image and training it based on the second sample image and the enhanced image.
5. The method according to claim 3, wherein, The polarity recognition model is obtained by randomly masking the second sample image to obtain a masked image, and then training it based on the second sample image and the masked image.
6. The method according to claim 5, wherein, The polarity recognition model is obtained by randomly masking the second sample image to obtain a masked region, blurring the masked region to obtain a masked image, and training based on the second sample image and the masked image. The blurring process includes Gaussian blurring and / or median blurring.
7. A model training method, comprising: Obtain a first sample dataset, wherein the first sample dataset includes a first sample image, and the first sample image is an inverted image; A non-polarity recognition model is trained based on the first sample dataset. The non-polarity recognition model is used to identify the chip component to be identified if the polarity attribute of the chip component to be identified is non-polarity, and then to obtain the identification result. The first sample image includes descriptive text for non-polar chip components; a non-polarity recognition model is trained based on the first sample dataset, including: A mapping relationship is constructed based on the descriptive text in the first sample image, wherein the mapping relationship is used to characterize the correspondence between inverted text and characters; The nonpolar recognition model is trained based on the first sample image and the mapping relationship; The nonpolar recognition model is used to, during recognition processing, if the image to be recognized is an inverted image, obtain the inverted descriptive text in the inverted image, determine the character corresponding to the inverted descriptive text according to the mapping relationship, and perform inverse mapping processing on the determined character according to the mapping relationship to obtain the recognition result.
8. The method according to claim 7, wherein, Based on the first sample image and the mapping relationship, the nonpolar recognition model is trained, including: Predict the characters of the descriptive text in the first sample image based on a preset basic network model; The basic network model is trained based on the predicted character and the mapping relationship to obtain the polarity-free recognition model.
9. The method according to claim 8, wherein, Based on the predicted character and the mapping relationship, the basic network model is trained to obtain the non-polarity recognition model, including: The real characters of the descriptive text in the first sample image are determined based on the mapping relationship; The difference information between the predicted character and the real character is calculated, and the model parameters of the basic network model are adjusted according to the difference information to obtain the polarity-free recognition model.
10. The method according to any one of claims 7-9, wherein, Obtain the first sample dataset, including: Acquire images of nonpolar chip components; An inverted image is obtained from the image of the nonpolar chip component, and the first sample dataset is constructed based on the inverted image.
11. A device for identifying chip components, comprising: The first acquisition unit is used to acquire the polarity attribute of the chip component to be identified, wherein the polarity attribute is either polarized or non-polarized. The calling unit is used to call an identification method for identifying the chip component to be identified according to the polarity attribute, wherein the identification methods corresponding to polarity and non-polarity are different. The identification unit is used to identify the chip component to be identified according to the called identification method, and obtain the identification result; If the polarity attribute is non-polar, then the identification unit includes: The first acquisition subunit is used to acquire the image of the chip component to be identified; The first recognition subunit is configured to: if the image to be recognized is an inverted image, obtain the inverted descriptive text of the chip component to be recognized in the inverted image; determine the character corresponding to the inverted descriptive text according to a preset mapping relationship; and perform inverse mapping processing on the determined character corresponding to the inverted descriptive text according to the mapping relationship to obtain the recognition result, wherein the mapping relationship is used to characterize the correspondence between the inverted text and the character; and / or, if the polarity attribute is non-polar, call the non-polarity recognition model; In addition, the chip component to be identified is identified according to the called identification method to obtain the identification result, including: the chip component to be identified is identified based on the non-polarity identification model to obtain the identification result; The non-polarity recognition model is trained based on a first sample dataset, which includes a first sample image, which is an inverted image, and includes descriptive text of non-polarity chip components.
12. A model training device, comprising: The second acquisition unit is used to acquire a first sample dataset, wherein the first sample dataset includes a first sample image, and the first sample image is an inverted image; The training unit is used to train a non-polarity recognition model based on the first sample dataset. The non-polarity recognition model is used to perform recognition processing on the chip component to be recognized if its polarity attribute is non-polarity, thereby obtaining a recognition result. Furthermore, during recognition processing, if the image to be recognized is an inverted image, the non-polarity recognition model is used to obtain the inverted descriptive text in the inverted image, determine the character corresponding to the inverted descriptive text according to a mapping relationship, and perform inverse mapping processing on the determined character according to the mapping relationship to obtain a recognition result. The first sample image includes descriptive text for non-polar chip components; the training unit includes: A subunit is constructed to construct a mapping relationship based on the descriptive text in the first sample image, wherein the mapping relationship is used to characterize the correspondence between inverted text and characters; The training subunit is used to train the nonpolar recognition model based on the first sample image and the mapping relationship.
13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to perform the method of any one of claims 1-6; or enable the at least one processor to perform the method of any one of claims 8-10.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6; or, the computer instructions are used to cause the computer to perform the method according to any one of claims 8-10.
15. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1-6; or, when executed by a processor, the computer program implements the steps of the method according to any one of claims 8-10.
Citation Information
Patent Citations
Text variation relation collecting method and device
CN113837118A
Deep learning-based microscopic character recognition and defect detection system and method
CN114062393A
Method and apparatus for inspecting mounted component, and method and apparatus for creating mounting substrate image data
JP2008277527A