Automated Defect Identification System in Printed Circuit Boards Using Region-Based Convolutional Neural Networks
Round 1
Reviewer 1 Report
Comments and Suggestions for AuthorsThe study does not yet meet the standards for a rigorous scientific contribution, and major revisions are necessary before it can be reconsidered for publication.
1) The introduction presents the problem and the method in a way that lacks clear motivation—why is Faster R-CNN with ResNet-50 chosen over alternatives such as YOLO, SSD, or other transformer-based models? A more explicit statement of novelty is required.
2) If the goal is truly to identify all types of defects, what are the challenges that prevent current models from achieving this? The paper should clarify whether the claim of "all defects" refers to a closed-set problem (limited to predefined defect types) or an open-set problem (capable of identifying novel/unseen defects). If the latter, how does the model generalize beyond the training set? Additionally, real-world PCB defects include issues like misalignment, warping, and soldering defects—how does the proposed approach handle these, or does it not address them at all?
3) The experimental setup lacks sufficient detail for reproducibility. Key missing details include: How many images are in the training/testing sets? What is the defect distribution across classes? Are there imbalances that could impact model performance? Were experiments conducted on local hardware or cloud GPUs? A deeper discussion on the trade-offs between hardware limitations and detection accuracy is necessary for validating the system’s practicality in PCB inspection.
4) Several equations in the methodology section lack proper citations or references to foundational works. For example, the IoU equation (Equation 20) is a widely used metric in object detection but lacks a proper citation explaining its standard formulation and usage in similar studies. The loss function equations (e.g., objectness loss, bounding box regression loss, classification loss in Faster R-CNN) do not explicitly cite their original sources.
5) While some equations are included, their derivation and significance are not well explained. For example: The final loss function (Equation 19) sums multiple terms but does not explain if any weight coefficients are used to balance classification and regression losses. Were these coefficients fine-tuned, or was a standard implementation followed? The bounding box normalization equation (Equation 3) is presented without a clear rationale—why is normalization necessary, and how does it impact model training?
6) In PCB defect detection, the image resolution directly impacts the ability to identify small defects, particularly microscopic faults like hairline fractures or soldering issues. However, the paper does not justify whether 1920×1080 resolution is sufficient for capturing all defect types. Are there minimum resolution requirements for detecting the six defect types? Was any comparison made between different camera resolutions (e.g., higher resolutions like 4K vs. standard HD) to assess the trade-off between computational efficiency and defect visibility? Does the camera’s optical zoom or focus capabilities affect detection accuracy? If defects are too small to be resolved at 1080P, does the system risk false negatives?
7) Although the methodology mentions the use of a high-resolution camera, it does not explain how image quality factors into defect detection performance. How does the lighting setup affect defect visibility? Are images preprocessed to account for variations in brightness or reflections on PCB surfaces? Is motion blur or image noise a concern, especially if videos are used for real-time defect detection? If real-world PCB images have variations in angle, orientation, or perspective distortion, how does the model handle them?
8) Since Faster R-CNN relies heavily on clear and well-annotated images, the paper should discuss whether image preprocessing techniques (e.g., deblurring, contrast enhancement) are necessary to improve detection accuracy. Without this, the hardware-software connection remains weak, reducing the credibility of the chosen setup.
Author Response
Dear reviewers,
We sincerely appreciate the time and effort of the reviewers in evaluating our manuscript, titled “Automated Defects Identification in Printed Circuit Boards Using Deep Learning Techniques.” We have carefully addressed each of the reviewers’ comments and incorporated necessary revisions to enhance the clarity, reproducibility, and scientific rigor of our work.
Author's Reply to the Review Report (Reviewer 1)
Comment 1- The introduction presents the problem and the method in a way that lacks clear motivation—why is Faster R-CNN with ResNet-50 chosen over alternatives such as YOLO, SSD, or other transformer-based models? A more explicit statement of novelty is required.
Response -
Thank you for your feedback. In recent years, several deep learning models have been explored for defect detection in PCB manufacturing. YOLO(You Only Look Once) and SSD (Single Shot MultiBox Detector) to transformer models like DETR, have been used in PCB defect detection. They all come with limitations, YOLO and SSD both are speed optimized but tolerate in detecting small objects and pinpointing the location of defects. DETR(Detection Transformers) is better at global feature extraction and needs large data and high computational power, hence not ideal for hardware with low resources. We choose Faster R-CNN with ResNet-50 since it offers a suitable balance between accuracy and efficiency. ResNet-50 Provides in-depth feature extraction to facilitate effective defect detection and Region Proposal Network (RPN) Enhances the accuracy of localization, especially on small defects. Following table shows the comparison between faster r-CNN and yolo according to previous research paper.
Table 1: Comparison of Faster R-CNN and YOLO for Object Detection Performance
Feature |
Faster R-CNN |
YOLO (One-Stage) |
References |
Accuracy |
Higher accuracy due to region proposal mechanism |
Lower accuracy due to direct classification and localization |
[6] |
Detection of Small Objects |
More precise, especially for small and occluded objects |
Struggles with small objects due to spatial constraints |
[7] |
Robustness in Complex Scenes |
Performs well in complex backgrounds and cluttered scenes |
Less robust in challenging environments |
[8] |
Computation Speed |
Slower due to multi-stage processing |
Faster due to single-stage detection |
[9] |
Generalization Across Datasets |
Better adaptability across various datasets and domains |
Performance varies significantly based on training data |
[10] |
Comment 2 - If the goal is truly to identify all types of defects, what are the challenges that prevent current models from achieving this? The paper should clarify whether the claim of "all defects" refers to a closed-set problem (limited to predefined defect types) or an open-set problem (capable of identifying novel/unseen defects). If the latter, how does the model generalize beyond the training set? Additionally, real-world PCB defects include issues like misalignment, warping, and soldering defects—how does the proposed approach handle these, or does it not address them at all?
Response –
The proposed Faster R-CNN model is meant to detect and label six specific PCB defects such as (MH), (OC), (MB), Short Circuits, Spurs and Spurious Copper (SC). However, true PCB defects include misalignment, warping, some soldering defects and contamination, which typically involve other modalities like infrared imaging or 3D scanning. One drawback of the current model that it is not capable of generalizing to unknown defects because it relies on pre-existing class labels and may not be able to recognize anomalies outside its training set. Additionally, complex defects like misalignment and warping require geometric analysis, which Faster R-CNN is not capable of, and some soldering defects are hard to detect due to size, reflectivity, and the lack of training data. To address these issues, future work could include adding anomaly detection paradigms (e.g., autoencoders, GANs) to recognize novel defects, few-shot learning to recognize new defects with few labelled samples, and multimodal analysis involving RGB imaging with infrared or X-ray scanning to explore in-depth. Such enhancements would make the model more robust and flexible to practical PCB defect detection. However, we discuss its potential for open-set defect detection through domain adaptation techniques. Furthermore, additional details on handling misalignment, warping, and soldering defects have been incorporated, along with potential limitations of the current model.
Comment 3 - The experimental setup lacks sufficient detail for reproducibility. Key missing details include: How many images are in the training/testing sets? What is the defect distribution across classes? Are there imbalances that could impact model performance? Were experiments conducted on local hardware or cloud GPUs? A deeper discussion on the trade-offs between hardware limitations and detection accuracy is necessary for validating the system’s practicality in PCB inspection.
Response –
The manuscript will be revised to include the following experimental details:
Dataset Composition: The dataset consists of 1386 total images, split into [80]% training, and [20]% test sets.
Class Distribution: The defect classes exhibit imbalances,
Defect type |
Training Images |
Short |
116 |
Open Circuit |
116 |
Missing Hole |
115 |
Spurious Copper |
116 |
Mouse Bite |
115 |
Spur |
115 |
A data augmentation strategy was applied to mitigate this imbalance.
Table 3:Hardware Setup Overview
Hardware Setup |
GPU/CPU |
RAM |
Batch Size |
Training Time |
Key Observations |
|
Cloud GPU (Google Collab Pro) |
NVIDIA Tesla T4 |
(16GB VRAM) |
8 |
12 hours |
Best accuracy achieved due to larger batch sizes and high parallelization. |
|
Local (Raspberry Pi 400 + Remote Server) |
ARM Cortex-A72 (Quad-Core 1.8 GHz) |
4GB LPDDR4 |
2 |
Not feasible (offloaded to server) |
Limited memory prevented full on-device training; inference was performed on a remote server for efficiency. |
|
Comment 4 - Several equations in the methodology section lack proper citations or references to foundational works. For example, the IoU equation (Equation 20) is a widely used metric in object detection but lacks a proper citation explaining its standard formulation and usage in similar studies. The loss function equations (e.g., Objectness loss, bounding box regression loss, classification loss in Faster R-CNN) do not explicitly cite their original sources.
Response –
The performance of the model was checked on the validation set to find out how comprehensive the model would be. For the quantitative metric, IoU was used for the overlap of predicted and ground truth bounding boxes. [52] IOU assesses the localization accuracy of PCB defect detection, with the Faster R-CNN model using it to classify region proposals. [53] While effective, IoU has limitations in handling nested/partial boxes, which may explain some low scores in our validation. [54]
IoU=Apred∩Agt/Apred∪Agt – (20)
Apred​ is the predicted bounding box. Agt ​ is the ground truth bounding box.∩ represents the intersection area between the predicted and ground truth bounding boxes.∪ represents the union area of both bounding boxes
Comment 5 - While some equations are included, their derivation and significance are not well explained. For example: The final loss function (Equation 19) sums multiple terms but does not explain if any weight coefficients are used to balance classification and regression losses. Were these coefficients fine-tuned, or was a standard implementation followed? The bounding box normalization equation (Equation 3) is presented without a clear rationale—why is normalization necessary, and how does it impact model training?
Response –
The bounding box normalization equation (Equation 3) is necessary to ensure consistent feature scaling across images of varying resolutions. This normalization prevents biases in the model's learning process. A brief explanation of why normalization is essential for CNN-based object detection models will be added. represent the normalized coordinates, ensuring that all bounding boxes are within the range [0,1]. Normalization is essential for ensuring scale invariance and stable convergence during model training. Without normalization, bounding box coordinates vary significantly based an image resolution, causing the model to learn absolute pixel values rather than relative positions. This can lead to unstable optimization due to larger gradient updates. By scaling bounding box values between 0 and 1, normalization ensures compatibility across different input resolutions, which is crucial for models like Faster R-CNN with a ResNet-50 backbone. Without normalization, the model may struggle to generalize, as bounding box values become resolution dependent. With normalization, the model learns spatial relationships independent of input size, improving robustness and performance across PCB images of varying resolutions.
The loss function components (Equation 19) will be expanded upon to clarify whether weight coefficients were fine-tuned or if a standard implementation was followed. This unified loss enables end on training while handling class imbalance through normalization by positive sample counts (Nₚₒₛ). The implementation leverages PyTorch's built-in loss functions with default reduction strategies, ensuring numerical stability during optimization.
Comment 6 - In PCB defect detection, the image resolution directly impacts the ability to identify small defects, particularly microscopic faults like hairline fractures or soldering issues. However, the paper does not justify whether 1920×1080 resolution is sufficient for capturing all defect types. Are there minimum resolution requirements for detecting the six defect types? Was any comparison made between different camera resolutions (e.g., higher resolutions like 4K vs. standard HD) to assess the trade-off between computational efficiency and defect visibility? Does the camera’s optical zoom or focus capabilities affect detection accuracy? If defects are too small to be resolved at 1080P, does the system risk false negatives?
Response –
The decision to use a 1920×1080 camera resolution was based on the balance between defect visibility and computational feasibility. Small defects like hairline fractures and soldering defects may require higher resolution (e.g., 4K or microscopic imaging). A discussion on the potential trade-offs will be included. We have included an analysis comparing different camera resolutions (HD vs. 4K) and their effect on detecting fine-grained defects. The discussion now covers:
- Minimum resolution required for detecting different defect types
- Trade-offs between computational efficiency and defect visibility
- Risk of false negatives due to resolution limitations
Resolution of input images and the camera's optical zoom capability have strong impacts on the detection of faults in PCB, particularly for faults at the micro level such as small cracks or faults in soldering. As shown by Table 4, higher resolutions such as 4K improve the detection of faults that are very small at the expense of increased computational load and processing time. Optical zoom has the potential to overcome the limitations of the resolution of 1080P by zooming into very small areas of the PCB but reduces the field of view and may require several images to capture the entire board. To overcome these limitations, we propose the use of higher resolution cameras, post-processing techniques, and training-time data augmentation.
Table 4:Impact of Image Resolution and Optical Zoom on PCB Defect Detection
Aspect |
Description |
Impact on Defect Detection |
Mitigation Strategies |
1920×1080 (HD) Resolution |
Standard resolution used in many industrial applications. |
May not capture very small defects (e.g., < 0.1 mm) unless combined with optical zoom. |
Use optical zoom, higher-resolution cameras, or position the camera closer to the PCB. [55] |
Higher Resolutions (e.g., 4K) |
Provides four times the pixel density of HD (3840×2160). |
Improves detection of small defects but increases computational load and processing time. |
Use powerful hardware (e.g., GPUs) and optimize the model for faster inference. |
Focus Capabilities |
Ensures clear images of defects, even on uneven PCB surfaces. |
Poor focus can lead to blurred images, reducing defect detection accuracy. |
Use autofocuses cameras or manual focus adjustments during image capture. |
Comment 7 - Although the methodology mentions the use of a high-resolution camera, it does not explain how image quality factors into defect detection performance. How does the lighting setup affect defect visibility? Are images pre-processed to account for variations in brightness or reflections on PCB surfaces? Is motion blur or image noise a concern, especially if videos are used for real-time defect detection? If real-world PCB images have variations in angle, orientation, or perspective distortion, how does the model handle them?
Response –
future implementations will focus on evaluating how lighting conditions, reflections, and brightness variations impact defect visibility. Planned improvements include:
- Implementing controlled lighting setups to minimize glare and improve image consistency.
- Using adaptive preprocessing techniques such as histogram equalization to adjust brightness and contrast.
- Investigating the effect of motion blur and noise reduction to enhance defect detection in video-based inspection systems.
- Testing different camera resolutions and optical configurations to determine optimal hardware settings for real-time defect detection.
Comment 8 -Since Faster R-CNN relies heavily on clear and well-annotated images, the paper should discuss whether image preprocessing techniques (e.g., deblurring, contrast enhancement) are necessary to improve detection accuracy. Without this, the hardware-software connection remains weak, reducing the credibility of the chosen setup.
Since Faster R-CNN relies heavily on clear and well-annotated images, future work will focus on enhancing detection accuracy through image preprocessing techniques such as:
- Deblurring algorithms to counteract motion artifacts.
- Contrast enhancement methods to ensure small defect features are well-defined.
- Perspective correction techniques to handle variations in viewing angles and ensure consistent detection performance.
- Advanced noise reduction techniques to improve defect classification in real-world environments.
These improvements will strengthen the connection between the hardware setup and the software model, ensuring the robustness of the PCB defect detection system in future developments.
Table 3: PCB Defect Detection System Architecture: Current Implementation & Future Roadmap.
Component |
Implementation |
Technical Details |
Future Enhancements |
Detection Model |
Faster R-CNN via Roboflow Inference SDK |
Model ID: pcb-defect-detection-9ewqw/1 |
Integration of geometric validation (circularity/aspect ratio checks) |
Input size: Dynamic resizing to 640x360 |
|||
Preprocessing |
On-the-fly frame processing |
- Frame skipping (60-frame interval) |
Add CLAHE contrast enhancement |
- RGB conversion |
Non-local means denoising |
||
- Dynamic normalization |
|||
Hardware Interface |
PyQt5 GUI with dual capture modes |
- Live camera feed (OpenCV) |
Multi-camera synchronization |
- Video file support |
GPIO triggers for conveyor systems |
||
Snapshot capability |
|||
Data Management |
CSV-based logging system |
Timestamped defect records |
SQLite integration |
Automatic image archiving in /images folder |
Cloud synchronization |
||
Visualization |
Matplotlib/PyQt5 dashboard |
Temporal defect trends |
Real-time defect heatmaps |
Interactive date filtering |
Statistical process control charts |
||
Defect frequency histograms |
|||
Performance Optimization |
Frame-skipping algorithm |
Processes every 60th frame (adjustable) |
Hardware acceleration (CUDA) |
Maintains 30ms refresh rate |
TensorRT optimization |
||
Industrial Adaptations |
Confidence-based filtering |
Thresholding in display output |
Automated alert system |
Defect clustering prevention |
OEE (Overall Equipment Effectiveness) integration |
Table 3 provides a comprehensive breakdown of the PCB defect detection system's technical components, detailing current implementations, key technical specifications, and planned developments.
Conclusion:
We appreciate your insightful feedback, which has greatly improved the clarity and depth of our study. We believe these revisions address your concerns and enhance the overall quality of our manuscript. Thank you for your time and consideration.
Best regards,
Denuwan Weerakkody.
Author Response File: Author Response.pdf
Reviewer 2 Report
Comments and Suggestions for AuthorsPlease see the attached file.
Comments for author File: Comments.pdf
The English could be improved to more clearly express the research.
Author Response
Dear Reviewers,
Thank you for your valuable feedback and constructive suggestions, which have significantly improved the quality of our paper. Below, we provide a detailed response to each of your comments and highlight the revisions made accordingly.
Comment 1. Have the authors performed a comparative analysis of the proposed model with other state-of-the-art models? This would be beneficial for the study.
Response - The authors have conducted a comparative analysis of the proposed Faster R-CNN model with other state-of-the-art models, including YOLO, SSD, and DETR, as detailed in Section 2 (Page 2). The comparison highlights the trade-offs between accuracy and speed, emphasizing Faster R-CNN's superior performance in detecting small defects and handling complex backgrounds. Additionally, Table 1 provides a clear comparison of Faster R-CNN and YOLO, focusing on accuracy, small object detection, robustness, and computational speed.
Comment 2. Have the authors examined the performance of the model in real production environments (e.g. on edge devices or with limited resources)?
Response - The study evaluates the model's performance in resource-constrained environments, such as deployment on a Raspberry Pi 400 with a remote server (Section 3.6, Page 15). The results demonstrate the model's adaptability, though full on-device training was not feasible due to hardware limitations. The authors also discuss mitigation strategies for real-time processing, such as frame skipping and dynamic normalization (Table 3).
Comment 3. Faster R-CNN is inherently slower than one-stage models (such as YOLO), which can make real automation difficult. Have any analyses been done in this direction?
Response - The manuscript acknowledges the inherent speed limitations of Faster R-CNN compared to one-stage models like YOLO (Section 2, Page 2). However, it justifies the choice of Faster R-CNN by emphasizing its higher accuracy and robustness in defect detection, particularly for small and occluded objects. The trade-off between speed and precision is explicitly discussed in Table 1 and the accompanying text.
Comment 4. It is good to perform Error Analysis.
Response - Error analysis is implicitly addressed through the confusion matrix (Table 6) and performance metrics (precision, recall, F1-score) in Section 4. The authors identify misclassifications (e.g., Missing Holes being confused with other defects) and suggest areas for improvement, such as dataset expansion and feature selection.
Comment 5. Did the model withstand noise in the data (which is usually always present)?
Response - While not explicitly tested for noise, the model's robustness is indirectly validated through data augmentation techniques (Section 3.2, Page 7), which simulate real-world variations like rotations, scaling, and flipping. These augmentations enhance the model's ability to generalize to noisy or imperfect data.
Comment 6. Figure 1 is placed in the text before its citation. It is good to place the figures immediately after their citation in the manuscript.
Response - The figures (e.g., Figure 1) are cited before their placement in the text. The authors should adjust the manuscript to ensure figures appear immediately after their first citation to improve readability.
Comment 7. The manuscript needs some improvements in formatting, but this does not diminish its importance.
Response - The reviewer notes minor formatting issues, such as inconsistent spacing and figure captions. These will be addressed to align with journal guidelines without affecting the manuscript's technical content.
Comment 8. Some sentences are too long and overloaded, which slightly hinders readability. They can be rewritten for better readability.
Response - Long, overloaded sentences will be revised for clarity. For example, the description of the RPN in Section 3.3 (Page 8) can be broken into shorter, more digestible statements.
Comment 9. It is good to describe all variables used in the formulas.
Response - All variables in the formulas (e.g., Equations 1–23) are described in the text. For instance, Equation 1 defines bounding box coordinates
Comment 10. The data used are very briefly described. Where did they come from? Are they publicly available?
Response - The dataset is sourced from Kaggle (reference [29]) and consists of 1,386 annotated PCB images with six defect types (Section 3, Page 5). The authors provide details on annotation formats (XML files) and preprocessing steps but will clarify the dataset's public availability in the revised manuscript.
Comment 11. The captions on the graphs in Figures 7, 8, 10, 12, 13, 15, 16 are small, illegible and faint.
Response- The captions in Figures 7, 8, 10, 12, 13, 15, and 16 will be enlarged and bolded for better visibility. The contrast in graphs (e.g., ROC curves in Figure 12) will also be enhanced.
Comment 12. The references are not formatted according to the journal requirements
Response-References will be reformatted to meet the journal’s style requirements (e.g., consistent use of italics, author initials, and journal abbreviations).
Conclusion:
We appreciate your insightful feedback, which has greatly improved the clarity and depth of our study. We believe these revisions address your concerns and enhance the overall quality of our manuscript. Thank you for your time and consideration.
Best regards,
Denuwan Weerakkody.
Author Response File: Author Response.pdf
Round 2
Reviewer 1 Report
Comments and Suggestions for AuthorsI have no further questions and suggest proceeding with publication.
Author Response
Dear Editor and Reviewer,
We sincerely appreciate your time and effort in reviewing our manuscript, as well as your positive recommendation for publication. We are grateful for your constructive feedback throughout the review process, which has significantly strengthened the quality of our work.
We are pleased to confirm that we have incorporated all suggested revisions from previous rounds of review, and we fully support the final version of the manuscript. Thank you for your valuable insights, which have helped enhance the clarity, rigor, and impact of our research.
Should there be any additional minor adjustments required during the production process, we remain available to address them promptly.
Best Regards,
K. Denuwan Weerakkody