Circuit board detection method and related device
By acquiring circuit board images and identifying components using target recognition models, and combining with standard component lists for automated inspection, the problem of accuracy and low efficiency of circuit board components assembly detection is solved, and efficient circuit board detection is achieved.
Patent Information
- Application Number
- CN202411220764.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-10
AI Technical Summary
In the prior art, circuit board components assembly detection relies on manual methods, and there are problems of poor detection accuracy and low efficiency, making it difficult to meet the inspection needs of massive production.
By obtaining the circuit board image, identifying components using the target recognition model, and automatically detecting them in combination with the standard component list to be detected, generating a list of components to be detected, and determining whether the circuit board has passed component assembly detection.
It improves detection accuracy and efficiency, realizes automatic detection of component particle size, and is more efficient than manual detection methods.
Smart Images

Figure CN119107313A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a circuit board detection method and related devices. Background Art
[0002] Printed Circuit Board (PCB) is an indispensable component of electronic devices. It is a substrate used to connect and support components.
[0003] Usually, a circuit board that has been assembled with components can be called a PCBA (Printed Circuit Board Assembly), and it can be put into production after the components are assembled. For example, it can be assembled based on the electronic circuit surface assembly technology (Surface Mount Technology, SMT). In practical applications, in order to ensure product quality, in the production and manufacturing process of electronic products, it is necessary to conduct component assembly inspection on the PCBA by observing the appearance, etc., to ensure that the components are assembled correctly.
[0004] In the related art, manual methods are usually used to perform component assembly inspection on PCBA. However, manual inspection methods usually have problems such as poor inspection accuracy and low inspection efficiency. In particular, manual inspection methods are difficult to meet the inspection needs of mass-produced products such as PCBA. Summary of the invention
[0005] In order to solve the above technical problems, the present application provides a circuit board detection method and related devices, which perform detection from the perspective of component granularity, which is beneficial to improving detection accuracy and, compared with manual detection methods, is beneficial to improving detection efficiency.
[0006] The embodiments of the present application disclose the following technical solutions:
[0007] On the one hand, an embodiment of the present application provides a circuit board detection method, the method comprising:
[0008] Obtaining a circuit board image corresponding to the circuit board to be inspected;
[0009] Determine, according to the target category corresponding to the circuit board to be inspected, a list of standard components corresponding to the circuit board to be inspected, wherein the list of standard components is used to indicate a plurality of target components assembled on a standard circuit board of the target category, and first assembly positions of the plurality of target components on the standard circuit board respectively;
[0010] Recognize the circuit board image by using the target recognition model corresponding to the target component to obtain a recognition result, wherein the recognition result is used to indicate whether the circuit board image includes the target component and, when the circuit board image includes the target component, the second assembly position of the target component in the circuit board image;
[0011] If the recognition results respectively corresponding to the plurality of target components indicate that the circuit board image includes the plurality of target components, determine a list of components to be detected corresponding to the circuit board to be detected based on the plurality of recognition results, the list of components to be detected being used to indicate the plurality of components to be detected assembled on the circuit board to be detected, and the second assembly positions of the plurality of components to be detected on the circuit board to be detected;
[0012] The list of components to be tested is tested according to the list of standard components to obtain a first test result, wherein the first test result is used to indicate whether the circuit board to be tested has passed the component assembly test.
[0013] On the other hand, an embodiment of the present application provides a circuit board detection device, the device comprising an acquisition unit, a determination unit, an identification unit and a detection unit:
[0014] The acquisition unit is used to acquire a circuit board image corresponding to the circuit board to be detected;
[0015] The determining unit is used to determine a list of standard components corresponding to the circuit board to be detected according to the target category corresponding to the circuit board to be detected, wherein the list of standard components is used to indicate a plurality of target components assembled on a standard circuit board of the target category, and first assembly positions of the plurality of target components on the standard circuit board respectively;
[0016] The recognition unit is used to recognize the circuit board image by using the target recognition model corresponding to the target component to obtain a recognition result, wherein the recognition result is used to indicate whether the circuit board image includes the target component and, when the circuit board image includes the target component, the second assembly position of the target component in the circuit board image;
[0017] The determining unit is further configured to determine a list of components to be detected corresponding to the circuit board to be detected based on the multiple recognition results if the recognition results corresponding to the multiple target components respectively indicate that the circuit board image includes the multiple target components, wherein the list of components to be detected is used to indicate the multiple components to be detected assembled on the circuit board to be detected, and the second assembly positions of the multiple components to be detected on the circuit board to be detected respectively;
[0018] The detection unit is used to detect the list of components to be detected according to the standard list of components to obtain a first detection result, and the first detection result is used to indicate whether the circuit board to be detected has passed the component assembly detection.
[0019] In another aspect, an embodiment of the present application provides a computer device, the computer device comprising a processor and a memory:
[0020] The memory is used to store program code and transmit the program code to the processor;
[0021] The processor is used to execute the circuit board detection method described in the above aspects according to the instructions in the program code.
[0022] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the circuit board detection method described in the above aspects.
[0023] It can be seen from the above technical solution that for the circuit board to be detected, the circuit board image corresponding to the circuit board to be detected is first obtained. The circuit board image can reflect the assembly of components on the circuit board to be detected, so the circuit board to be detected can be subjected to component assembly detection based on the circuit board image to determine whether the circuit board is a qualified product. Specifically, according to the target category corresponding to the circuit board to be detected, the standard component list corresponding to the circuit board to be detected is determined. The standard component list is used to indicate multiple target components assembled on the standard circuit board of the target category, and the first assembly positions of multiple target components on the standard circuit board, that is, the standard component list can reflect the component assembly of qualified products of this category of circuit boards. Then, the circuit board image is identified through the target recognition model corresponding to the target component to obtain a recognition result, which is used to indicate whether the target component is included in the circuit board image, and when the target component is included in the circuit board image, the second assembly position of the target component in the circuit board image. Correspondingly, if the recognition results corresponding to the multiple target components respectively indicate that the circuit board image includes multiple target components, then the list of components to be detected corresponding to the circuit board to be detected is determined based on the multiple recognition results. The list of components to be detected is used to indicate the components to be detected assembled on the circuit board to be detected, and the second assembly position of the components to be detected on the circuit board to be detected, that is, the list of components to be detected can reflect the assembly of components on the circuit board to be detected. Finally, the list of components to be detected is detected according to the standard component list to obtain the detection result. The detection result is used to indicate whether the circuit board to be detected has passed the component assembly test, thereby judging whether the circuit board to be detected is a qualified product. Based on this, detection from the granularity of components is conducive to improving the detection accuracy, and the standard component list of the standard circuit board is used to realize automatic detection, which is conducive to improving the detection efficiency compared with the manual detection method. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 A flowchart of a circuit board detection method provided in an embodiment of the present application;
[0026] Figure 2 A structural diagram of a circuit board detection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0028] The circuit board detection method provided in the embodiment of the present application can be implemented by a computer device, which can be a terminal device or a server, wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device includes but is not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, etc. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, and this application does not impose any restrictions on this.
[0029] The specific examples are as follows:
[0030] Figure 1 A flowchart of a circuit board detection method provided in an embodiment of the present application is described by taking a server as the aforementioned computer device as an example. The method includes S101-S105:
[0031] S101: Acquire a circuit board image corresponding to the circuit board to be inspected.
[0032] The circuit board to be tested refers to the circuit board that needs to be tested, specifically, the circuit board that needs to be tested for component assembly to determine whether the circuit board is a qualified product. First, a circuit board image corresponding to the circuit board to be tested can be obtained. The circuit board image can reflect the component assembly status on the circuit board to be tested, so the component assembly test can be performed on the circuit board to be tested based on the circuit board image.
[0033] It should be noted that this application does not impose any limitation on how to obtain the circuit board image.
[0034] For ease of understanding, the present application provides the following examples as examples:
[0035] In a possible implementation, an image acquisition device can be used to acquire an image of a circuit board to be inspected, and in the process of image acquisition, the image in the field of view acquired by the image acquisition device when the target two-dimensional code is recognized is determined as a circuit board image. Among them, the target two-dimensional code is assembled on the target surface of the circuit board to be inspected, and the target surface is used to assemble components. Therefore, when the target two-dimensional code is recognized, it can be considered that the target surface of the circuit board to be inspected appears in the field of view of the image acquisition device at this time, so the image in the field of view acquired at this time can be determined as a circuit board image. Based on this, it is ensured that the acquired circuit board image can reflect the assembly status of components on the circuit board to be inspected, thereby improving accuracy.
[0036] Among them, the image acquisition device can be an acquisition client, which is usually distributed in the form of "programmed camera + control host" in various places where image acquisition is required (such as the component assembly line of the circuit board). In terms of hardware, it can include a control host, a programmable camera, a fill light, a fixed bracket, and a communication control cable, and in terms of software, it can include image acquisition, recognition processing, storage management, and intranet communication modules. Based on this, image acquisition can be completed in the assembly line link, and it can be directly obtained from here when it is needed for subsequent inspection, which improves efficiency.
[0037] In practical applications, the acquisition client can be used in the component assembly line of the circuit board (such as automatic welding, manual welding, box assembly, debugging and testing, etc.). During the working process of the acquisition client, the image in the field of view will be collected cyclically. Then, during the cyclic acquisition process, when the target QR code is recognized, the circuit board image can be determined for subsequent detection.
[0038] S102: Determine a standard component list corresponding to the circuit board to be inspected according to a target category corresponding to the circuit board to be inspected.
[0039] Among them, the standard component list is used to indicate multiple target components assembled on the standard circuit board of the target category, and the first assembly positions of multiple target components on the standard circuit board. The standard circuit board refers to a qualified product of the circuit board of the target category. Usually, the assembly of components on the circuit board of the same category is the same, so it can be used as a reference for testing the circuit board to be tested. Correspondingly, that is, the standard component list can reflect the assembly of components on the qualified products of the circuit board of the target category, so that the component assembly test of the circuit board to be tested can be performed based on this as a reference.
[0040] It should be noted that the present application does not impose any limitation on how to determine the target category of the circuit board to be detected. For ease of understanding, the present application embodiment provides the following method as an example:
[0041] In practical applications, in addition to the aforementioned determination of the timing of collecting the circuit board image, the target QR code may also carry relevant information (such as category information, etc.) of the circuit board to be detected. Therefore, in a possible implementation, the target QR code may be parsed to obtain the target category corresponding to the circuit board to be detected. Exemplarily, the target QR code may carry a unique coded signal identification (Identity Document, ID) of the circuit board to be detected, and the corresponding target category may be determined based on the ID.
[0042] Furthermore, the present application does not impose any limitation on the exact method of the standard component list. For ease of understanding, the present application embodiment provides the following method as an example:
[0043] It is understandable that the design stage of the circuit board precedes the production, so how to assemble components on the circuit board of this category has been clarified in the design stage, and a standard component list of this category has been generated accordingly to guide subsequent actual production (such as assembling components on the circuit board, etc.). Therefore, in one possible implementation method, the design requirement file for the circuit board of the target category can be directly obtained in the design stage to determine what the multiple target components assembled on the standard circuit board of the target category are, and the first assembly positions corresponding to these target components, thereby determining the corresponding standard component list. For example, common 0805 package chip resistors and capacitors, switch tubes, LDOs and other target components.
[0044] S103: Identify the circuit board image using a target recognition model corresponding to the target component to obtain a recognition result.
[0045] The recognition result is used to indicate whether the circuit board image includes the target component, and when the circuit board image includes the target component, the second assembly position of the target component in the circuit board image.
[0046] In practical applications, different target components correspond to different target recognition models. For multiple target components, the above S103 can be implemented in sequence to complete the identification of whether the circuit board image includes multiple target components assembled on qualified products, and mark the corresponding second assembly positions. Based on this, the identification of component granularity is achieved for subsequent detection.
[0047] It should be noted that this application does not impose any limitation on the method of determining the target recognition model.
[0048] For ease of understanding, the present application provides the following examples as examples:
[0049] In one possible implementation, the target recognition model is determined as follows:
[0050] First, a training sample image with a sample label is obtained, and the sample label is used to indicate whether the target component is included in the training sample image. Then, a sample recognition result can be determined by the initial model based on the training sample image, and the sample recognition result is used to indicate whether the target component is included in the training sample image, and when the target component is included in the training sample image, the identification assembly position of the target component in the training sample image. Finally, based on the difference between the sample recognition result and the sample label, the initial model can be trained to obtain a target recognition model.
[0051] Based on this, through model training, the model can iteratively learn the characteristics of each component, so that it has the ability to distinguish whether it is a target component, and accordingly obtains a target recognition model that can be used to identify the target component. For each component, the corresponding recognition model can be determined in the above manner, so that it can be directly called when the detection is needed, thereby improving the detection efficiency. In practical applications, a corresponding relationship can be established based on the identification of the component and the recognition model, so that when calling, for the target component, the corresponding target recognition model can be quickly determined based on the identification of the target component.
[0052] It is understandable that before the circuit board is produced, there is already a standard component list (which can indicate what components are there and the corresponding assembly positions, etc.). During the circuit board production process, a large number of automated standard image acquisition devices (such as the aforementioned acquisition client) are often deployed in the production process, so a large amount of circuit board image information can be obtained in the generation process. Therefore, this application also provides a method for automatically labeling and determining training sample images to solve the problem of high training costs caused by the need for manual labeling and determination of training sample images in related technologies.
[0053] In specific implementation, the training sample image can be determined by the following method:
[0054] First, after the components corresponding to the sample circuit board are assembled, the sample circuit board is imaged to obtain an initial sample image. The sample circuit board may refer to any circuit board on which components are assembled on an assembly line. It is understandable that the assembly of all components on the sample circuit board may be considered completed after the assembly line is completed, and image acquisition may be performed. Alternatively, the assembly of the target components on the sample circuit board may be considered completed after the assembly line is completed, and image acquisition may be performed. Based on this, automatic image acquisition is achieved to reduce the workload of manual shooting.
[0055] Next, based on the target components indicated by the standard component list corresponding to the sample circuit board and the first assembly position corresponding to the target components, the target components included in the initial sample image are labeled to obtain a positive sample image, and the sample label of the positive sample image is used to indicate that the positive sample image includes the target components. And, based on the other components indicated by the standard component list corresponding to the sample circuit board and the first assembly positions corresponding to the other components, the other components included in the initial sample image are labeled to obtain a negative sample image, and the sample label of the negative sample image is used to indicate that the negative sample image does not include the target components.
[0056] Finally, the training sample images are constructed based on the positive sample images and the negative sample images.
[0057] Based on this, the production characteristics of the circuit board are flexibly utilized, and the existing bill of materials and coordinate files of the circuit board are used to realize the automatic labeling of the training samples. Compared with the method of manually marking the training samples in the related technology, it is conducive to reducing the training cost. Among them, the bill of materials can refer to the generated manufacturing files of the circuit board, etc., and the coordinate file is mainly used to locate the assembly position of the components on the circuit board, which can usually be located in the form of coordinates.
[0058] Usually, due to the high cost of manual annotation, the amount of training sample images is small, so the training sample image set annotated in this way can also be called a civilian-grade training data set, and the accuracy of the corresponding recognition model is also limited, which can be called a general-purpose recognition model. In contrast, the automatic annotation provided by this application is conducive to constructing a large number of training sample images, so it can be called an industrial-grade training data set. After model training based on this, it is conducive to improving model performance, etc., so it can be called a professional recognition model.
[0059] S104: If the recognition results corresponding to the plurality of target components respectively indicate that the circuit board image includes the plurality of target components, a list of components to be inspected corresponding to the circuit board to be inspected is determined based on the plurality of recognition results.
[0060] After the recognition is completed using the recognition model, if the recognition results corresponding to the multiple target components indicate that the circuit board image includes multiple target components, it means that the circuit board to be tested is indeed equipped with multiple target components that should be equipped on the qualified product. Therefore, the corresponding list of components to be tested can be determined based on multiple recognition results. Among them, the list of components to be tested is used to indicate the multiple components to be tested assembled on the circuit board to be tested, and the second assembly positions of the multiple components to be tested on the circuit board to be tested, that is, the list of components to be tested can reflect the assembly status of the components on the circuit board to be tested. Based on this, the recognition results are used to clarify the specific assembly status of the components on the circuit board to be tested for subsequent testing.
[0061] On the contrary, if there is a target recognition result indicating that the circuit board image does not include the target component corresponding to the target recognition result in the recognition results corresponding to the multiple target components, it means that at least one target component is not assembled in the circuit board to be tested. At this time, it can be considered that there is a component assembly missing problem, so it can be directly determined that the circuit board to be tested has not passed the component assembly test. Based on this, the component assembly test is completed more quickly, the efficiency is improved, and the subsequent detection steps are saved.
[0062] S105: Testing the list of components to be tested according to the standard list of components to obtain a first test result.
[0063] Since the standard component list can reflect the component assembly of qualified products of this type of circuit board and is used as a reference, the component list to be tested can reflect the component assembly on the circuit board to be tested. Therefore, after determining the component list to be tested, the component list to be tested can be tested according to the standard component list to obtain a first test result. The first test result is used to indicate whether the circuit board to be tested has passed the component assembly test.
[0064] Based on this, testing based on the granularity of components is conducive to improving detection accuracy, and the standard component list of standard circuit boards is used to achieve automated testing, which is conducive to improving detection efficiency compared to manual testing methods.
[0065] It should be noted that the present application does not make any limitation on how to test the list of components to be tested according to the list of standard components. For ease of understanding, the present application provides the following methods as examples:
[0066] In a possible implementation, the components to be detected and the second assembly positions corresponding to the components to be detected can be detected based on the target components and the first assembly positions corresponding to the target components to obtain a second detection result. The components to be detected refer to the target components included in the circuit board image, and the second detection result is used to indicate whether the target components assembled on the circuit board to be detected have passed the assembly detection, that is, the second detection result can indicate whether the assembly position of the target components assembled on the circuit board to be detected is correct. Finally, the first detection result can be determined based on the second detection results corresponding to the multiple components to be detected. Based on this, at the component granularity, the multiple components to be detected are detected one by one, and then the detection result of the entire circuit board is determined by combining the detection results of the multiple components.
[0067] In the above-mentioned process of testing multiple components to be tested in sequence from the component granularity, if it is performed sequentially, it can be determined whether to test the next component to be tested based on the second test result corresponding to the previous component to be tested. If the second test result corresponding to the previous component to be tested indicates that the component to be tested has not passed the assembly test (such as the assembly position of the component to be tested is incorrect), the test can be ended directly without testing the subsequent components to be tested, and the first test result indicating that the circuit board to be tested has not passed the component assembly test is directly generated. Based on this, it is helpful to save detection resources.
[0068] Of course, in order to improve the detection efficiency, the detection process can also be performed in parallel for multiple components to be detected, so as to determine multiple second detection results more quickly and improve the detection efficiency.
[0069] It is understandable that, in order to facilitate subsequent re-inspection, when it is detected that the component assembly test has not passed, the existing problems can be marked so that relevant personnel can directly understand the existing assembly problems, etc. For example, if a certain target component is missing, the current circuit board to be tested is marked as a certain target component. For another example, if the assembly position of a certain target component is incorrect, the wrong assembly position is marked, etc. Based on this, when assembling a circuit board, there is a flow between processes such as automatic welding, manual welding, assembly of box assemblies, debugging and testing, and the flow process may have bumps, vibrations or loose welding, resulting in component defects, or component assembly positions are incorrect due to other problems, etc. After adopting this application, unqualified products can be effectively detected, thereby avoiding the continuous circulation of unqualified products and improving product quality.
[0070] It can be seen from the above technical solution that for the circuit board to be detected, the circuit board image corresponding to the circuit board to be detected is first obtained. The circuit board image can reflect the assembly of components on the circuit board to be detected, so the circuit board to be detected can be subjected to component assembly detection based on the circuit board image to determine whether the circuit board is a qualified product. Specifically, according to the target category corresponding to the circuit board to be detected, the standard component list corresponding to the circuit board to be detected is determined. The standard component list is used to indicate multiple target components assembled on the standard circuit board of the target category, and the first assembly positions of multiple target components on the standard circuit board, that is, the standard component list can reflect the component assembly of qualified products of this category of circuit boards. Then, the circuit board image is identified through the target recognition model corresponding to the target component to obtain a recognition result, which is used to indicate whether the target component is included in the circuit board image, and when the target component is included in the circuit board image, the second assembly position of the target component in the circuit board image. Correspondingly, if the recognition results corresponding to the multiple target components respectively indicate that the circuit board image includes multiple target components, then the list of components to be detected corresponding to the circuit board to be detected is determined based on the multiple recognition results. The list of components to be detected is used to indicate the components to be detected assembled on the circuit board to be detected, and the second assembly position of the components to be detected on the circuit board to be detected, that is, the list of components to be detected can reflect the assembly of components on the circuit board to be detected. Finally, the list of components to be detected is detected according to the standard component list to obtain the detection result. The detection result is used to indicate whether the circuit board to be detected has passed the component assembly test, thereby judging whether the circuit board to be detected is a qualified product. Based on this, detection from the granularity of components is conducive to improving the detection accuracy, and the standard component list of the standard circuit board is used to realize automatic detection, which is conducive to improving the detection efficiency compared with the manual detection method.
[0071] In order to facilitate management, in actual applications, in addition to the aforementioned collection client, a storage management service module and a query client can also be configured. Specifically:
[0072] The storage management service module can be used to collect circuit board images from various distributed collection clients on mobile phones, as well as to store the aforementioned recognition models. Based on this, the full-process image collection and processing management solution can be implemented based on the production and process management model of circuit boards, which is not only limited to the production process, but can also be applied to inventory delivery management and other links.
[0073] The query client is a client application in the form of software for user use. After establishing a connection with the storage management service module, the user can access the storage management service module through the query client to initiate corresponding tests, obtain test results, etc. Usually, different permissions can be configured for different users to ensure the data security of the storage management service module.
[0074] In actual applications, the storage management service module, acquisition client, and query client in this application can be deployed based on the C / S architecture of Client / Server. Based on this, hardware acquisition solutions with different requirements can be flexibly configured and managed, and recognition models can be updated in real time.
[0075] It can be understood that it basically corresponds to the method embodiment, so the relevant parts can refer to the partial description of the method embodiment.
[0076] Figure 2 This is a structural diagram of a circuit board detection device provided in an embodiment of the present application, wherein the device includes an acquisition unit 201, a determination unit 202, an identification unit 203, and a detection unit 204:
[0077] The acquisition unit 201 is used to acquire a circuit board image corresponding to the circuit board to be detected;
[0078] The determining unit 202 is used to determine a standard component list corresponding to the circuit board to be detected according to the target category corresponding to the circuit board to be detected, wherein the standard component list is used to indicate multiple target components assembled on the standard circuit board of the target category, and the first assembly positions of the multiple target components on the standard circuit board respectively;
[0079] The recognition unit 203 is used to recognize the circuit board image through the target recognition model corresponding to the target component to obtain a recognition result, wherein the recognition result is used to indicate whether the circuit board image includes the target component and, when the circuit board image includes the target component, the second assembly position of the target component in the circuit board image;
[0080] The determining unit 202 is further configured to determine a list of components to be detected corresponding to the circuit board to be detected based on the multiple recognition results if the recognition results corresponding to the multiple target components respectively indicate that the circuit board image includes the multiple target components, wherein the list of components to be detected is used to indicate the multiple components to be detected assembled on the circuit board to be detected, and the second assembly positions of the multiple components to be detected on the circuit board to be detected respectively;
[0081] The detection unit 203 is used to detect the list of components to be detected according to the standard list of components to obtain a first detection result, where the first detection result is used to indicate whether the circuit board to be detected has passed the component assembly test.
[0082] In a possible implementation, the detection unit is further used for:
[0083] Based on the target component and the first assembly position corresponding to the target component, the component to be detected and the second assembly position corresponding to the component to be detected are detected to obtain a second detection result, wherein the second detection result is used to indicate whether the target component assembled on the circuit board to be detected passes the assembly detection, and the component to be detected refers to the target component included in the circuit board image;
[0084] The first detection result is determined according to the second detection results respectively corresponding to the plurality of components to be detected.
[0085] In a possible implementation manner, the determining unit is further configured to:
[0086] If, among the recognition results corresponding to the plurality of target components, there is a target recognition result indicating that the circuit board image does not include the target component corresponding to the target recognition result, it is determined that the circuit board to be inspected fails the component assembly inspection.
[0087] In a possible implementation manner, the acquiring unit is further configured to:
[0088] Capturing an image of the circuit board to be inspected by an image acquisition device;
[0089] During the image acquisition process, the image within the field of view acquired by the image acquisition device when the target two-dimensional code is identified is determined as the circuit board image. The target two-dimensional code is mounted on the target surface of the circuit board to be detected, and the target surface is used to assemble components.
[0090] In a possible implementation manner, the acquiring unit is further configured to:
[0091] The target two-dimensional code is parsed to obtain the target category corresponding to the circuit board to be detected.
[0092] In a possible implementation manner, the determining unit is further configured to:
[0093] Acquire a training sample image with a sample label, where the sample label is used to indicate whether the training sample image includes the target component;
[0094] Determine a sample recognition result according to the training sample image through an initial model, wherein the sample recognition result is used to indicate whether the training sample image includes the target component and, when the training sample image includes the target component, the identified assembly position of the target component in the training sample image;
[0095] Based on the difference between the sample recognition result and the sample label, the initial model is trained to obtain the target recognition model.
[0096] In a possible implementation manner, the determining unit is further configured to:
[0097] After the components corresponding to the sample circuit board are assembled, an image of the sample circuit board is captured to obtain an initial sample image;
[0098] Based on the target components indicated by the standard component list corresponding to the sample circuit board and the first assembly position corresponding to the target components, the target components included in the initial sample image are labeled to obtain a positive sample image, wherein the sample label of the positive sample image is used to indicate that the positive sample image includes the target components;
[0099] Based on other components indicated by the standard component list corresponding to the sample circuit board and the first assembly positions corresponding to the other components, the other components included in the initial sample image are labeled to obtain a negative sample image, wherein the sample label of the negative sample image is used to indicate that the target component is not included in the negative sample image;
[0100] The training sample image is constructed according to the positive sample image and the negative sample image.
[0101] It can be seen from the above technical solution that for the circuit board to be detected, the circuit board image corresponding to the circuit board to be detected is first obtained. The circuit board image can reflect the assembly of components on the circuit board to be detected, so the circuit board to be detected can be subjected to component assembly detection based on the circuit board image to determine whether the circuit board is a qualified product. Specifically, according to the target category corresponding to the circuit board to be detected, the standard component list corresponding to the circuit board to be detected is determined. The standard component list is used to indicate multiple target components assembled on the standard circuit board of the target category, and the first assembly positions of multiple target components on the standard circuit board, that is, the standard component list can reflect the component assembly of qualified products of this category of circuit boards. Then, the circuit board image is identified through the target recognition model corresponding to the target component to obtain a recognition result, which is used to indicate whether the target component is included in the circuit board image, and when the target component is included in the circuit board image, the second assembly position of the target component in the circuit board image. Correspondingly, if the recognition results corresponding to the multiple target components respectively indicate that the circuit board image includes multiple target components, then the list of components to be detected corresponding to the circuit board to be detected is determined based on the multiple recognition results. The list of components to be detected is used to indicate the components to be detected assembled on the circuit board to be detected, and the second assembly position of the components to be detected on the circuit board to be detected, that is, the list of components to be detected can reflect the assembly of components on the circuit board to be detected. Finally, the list of components to be detected is detected according to the standard component list to obtain the detection result. The detection result is used to indicate whether the circuit board to be detected has passed the component assembly test, thereby judging whether the circuit board to be detected is a qualified product. Based on this, detection from the granularity of components is conducive to improving the detection accuracy, and the standard component list of the standard circuit board is used to realize automatic detection, which is conducive to improving the detection efficiency compared with the manual detection method.
[0102] In another aspect, an embodiment of the present application provides a computer device, the computer device comprising a processor and a memory:
[0103] The memory is used to store program code and transmit the program code to the processor;
[0104] The processor is used to execute the circuit board detection method provided by the above embodiment according to the instructions in the program code.
[0105] The computer device may include a terminal device or a server, and the aforementioned circuit board detection apparatus may be configured in the computer device.
[0106] On the other hand, an embodiment of the present application further provides a storage medium, wherein the storage medium is used to store a computer program, and the computer program is used to execute the circuit board detection method provided in the above embodiment.
[0107] In addition, an embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the circuit board detection method provided in the above embodiment.
[0108] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, the above program can be stored in a computer-readable storage medium, and when the program is executed, it executes the steps of the above method embodiment; and the above storage medium can be at least one of the following media: read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc., various media that can store program codes.
[0109] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0110] It should be noted that, in this article, relational terms such as "first" and "second", etc. (if any) are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0111] The above is a detailed introduction to a circuit board detection method and related devices provided by the embodiment of the present application. The principle and implementation method of the present application are described in detail using specific examples. The description of the above embodiments is only used to help understand the method of the present application. At the same time, for those skilled in the art, according to the method of the present application, there will be changes in the specific implementation method and application scope.
[0112] In summary, the content of this specification should not be understood as limiting the present application, and any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in this application should be included in the protection scope of this application. Moreover, based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations.
Claims
1. A circuit board detection method, characterized in that: The method comprises: Obtaining a circuit board image corresponding to the circuit board to be inspected; Determine, according to the target category corresponding to the circuit board to be inspected, a list of standard components corresponding to the circuit board to be inspected, wherein the list of standard components is used to indicate a plurality of target components assembled on a standard circuit board of the target category, and first assembly positions of the plurality of target components on the standard circuit board respectively; Recognize the circuit board image by using the target recognition model corresponding to the target component to obtain a recognition result, wherein the recognition result is used to indicate whether the circuit board image includes the target component and, when the circuit board image includes the target component, the second assembly position of the target component in the circuit board image; If the recognition results respectively corresponding to the plurality of target components indicate that the circuit board image includes the plurality of target components, determine a list of components to be detected corresponding to the circuit board to be detected based on the plurality of recognition results, the list of components to be detected being used to indicate the plurality of components to be detected assembled on the circuit board to be detected, and the second assembly positions of the plurality of components to be detected on the circuit board to be detected; The list of components to be tested is tested according to the list of standard components to obtain a first test result, wherein the first test result is used to indicate whether the circuit board to be tested has passed the component assembly test.
2. The method according to claim 1, characterized in that The step of testing the list of components to be tested according to the list of standard components to obtain a first test result includes: Based on the target component and the first assembly position corresponding to the target component, the component to be detected and the second assembly position corresponding to the component to be detected are detected to obtain a second detection result, wherein the second detection result is used to indicate whether the target component assembled on the circuit board to be detected passes the assembly detection, and the component to be detected refers to the target component included in the circuit board image; The first detection result is determined according to the second detection results respectively corresponding to the plurality of components to be detected.
3. The method according to claim 1, characterized in that The method further comprises: If, among the recognition results corresponding to the plurality of target components, there is a target recognition result indicating that the circuit board image does not include the target component corresponding to the target recognition result, it is determined that the circuit board to be inspected fails the component assembly inspection.
4. The method according to claim 1, characterized in that: The step of obtaining a circuit board image corresponding to the circuit board to be detected includes: Capturing an image of the circuit board to be inspected by an image acquisition device; During the image acquisition process, the image within the field of view acquired by the image acquisition device when the target two-dimensional code is identified is determined as the circuit board image. The target two-dimensional code is mounted on the target surface of the circuit board to be detected, and the target surface is used to assemble components.
5. The method according to claim 4, characterized in that The method further comprises: The target two-dimensional code is parsed to obtain the target category corresponding to the circuit board to be detected.
6. The method according to claim 1, characterized in that The target recognition model is determined by: Acquire a training sample image with a sample label, where the sample label is used to indicate whether the training sample image includes the target component; Determine a sample recognition result according to the training sample image through an initial model, wherein the sample recognition result is used to indicate whether the training sample image includes the target component and, when the training sample image includes the target component, the identified assembly position of the target component in the training sample image; Based on the difference between the sample recognition result and the sample label, the initial model is trained to obtain the target recognition model.
7. The method according to claim 6, characterized in that The step of obtaining a training sample image with a sample label comprises: After the components corresponding to the sample circuit board are assembled, an image of the sample circuit board is captured to obtain an initial sample image; Based on the target components indicated by the standard component list corresponding to the sample circuit board and the first assembly position corresponding to the target components, the target components included in the initial sample image are labeled to obtain a positive sample image, wherein the sample label of the positive sample image is used to indicate that the positive sample image includes the target components; Based on other components indicated by the standard component list corresponding to the sample circuit board and the first assembly positions corresponding to the other components, the other components included in the initial sample image are labeled to obtain a negative sample image, wherein the sample label of the negative sample image is used to indicate that the target component is not included in the negative sample image; The training sample image is constructed according to the positive sample image and the negative sample image.
8. A circuit board detection device, characterized in that: The device comprises an acquisition unit, a determination unit, an identification unit and a detection unit: The acquisition unit is used to acquire a circuit board image corresponding to the circuit board to be detected; The determining unit is used to determine a list of standard components corresponding to the circuit board to be detected according to the target category corresponding to the circuit board to be detected, wherein the list of standard components is used to indicate a plurality of target components assembled on a standard circuit board of the target category, and first assembly positions of the plurality of target components on the standard circuit board respectively; The recognition unit is used to recognize the circuit board image by using the target recognition model corresponding to the target component to obtain a recognition result, wherein the recognition result is used to indicate whether the circuit board image includes the target component and, when the circuit board image includes the target component, the second assembly position of the target component in the circuit board image; The determining unit is further configured to determine a list of components to be detected corresponding to the circuit board to be detected based on the multiple recognition results if the recognition results corresponding to the multiple target components respectively indicate that the circuit board image includes the multiple target components, wherein the list of components to be detected is used to indicate the multiple components to be detected assembled on the circuit board to be detected, and the second assembly positions of the multiple components to be detected on the circuit board to be detected respectively; The detection unit is used to detect the list of components to be detected according to the standard list of components to obtain a first detection result, and the first detection result is used to indicate whether the circuit board to be detected has passed the component assembly detection.
9. A computer device, characterized in that: The computer device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the method according to any one of claims 1 to 7 according to the instructions in the program code.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Electronic component detection device and detection method thereof
CN114199890A
Circuit board detection method and device, model training method and device and electronic equipment
CN115239683A
Defect detection method and related device
CN116958031A
Classification model-based element angle classification method and system
CN117409261A
Cited By
Circuit board function detection method based on signal acquisition
CN119716502A
