PepsiCo's pursuit of high-quality chips inspired our deep learning project, leveraging a Kaggle dataset of defective and non-defective chip images. Using PyTorch and TorchVision, we tackled the challenge of creating a binary classification model to assist in quality control. View the Github blog post linked below that highlights our journey, from data preprocessing and background removal attempts to implementing the LeNet CNN architecture, achieving 95% accuracy while refining our computer vision skills.
This work demonstrates the transformative potential of computer vision in automating quality control processes, reducing human error, and increasing efficiency across manufacturing industries. By deploying accurate models like ours, companies can ensure consistent product quality, minimize waste, and streamline operations, paving the way for smarter, data-driven production systems.
Challenge: The initial approach to load and preprocess images by directly iterating through all training and testing samples was memory-intensive. It caused inefficiencies in handling large datasets, leading to difficulties in creating manageable training and testing matrices.
Solution: We replaced the direct iteration with a more efficient data structure for image handling. After, we converted image data into NumPy arrays and stored them in separate .npy files, ensuring better memory management and faster access during model training.
Challenge: While the dataset was balanced in terms of defective and non-defective images, there was a need for robust data augmentation to prevent overfitting due to the relatively small dataset size (961 images).
Solution: Used TorchVision to apply data augmentation transformations, such as horizontal and vertical flips, random rotations, and resizing. Focused on transformations that preserved chip characteristics while introducing variability, ensuring better generalization without compromising accuracy.
Challenge: Choosing an appropriate neural network architecture was critical given the dataset size and task complexity. A complex model might overfit, while a simple one might underperform.
Solution: Implemented the LeNet Convolutional Neural Network, known for its simplicity and efficacy in small datasets. Adjusted the architecture by removing the final softmax layer and applying the softmax function in the training code, optimizing logits processing and loss calculation.
As discussed at the end of the blog post, the optimized LeNet CNN achieved an impressive 95% accuracy in chip quality classification.
Working on this quality control project provided valuable hands-on experience in training and optimizing machine learning models, a skill that directly translated to my research on shape memory alloys in the MINED lab. The process of tuning a convolutional neural network (CNN) for high accuracy taught me the importance of data preprocessing, feature extraction, and model evaluation—insights I applied when handling large datasets in my alloy research. Additionally, the project reinforced the significance of iterating on models and hyperparameters, a practice I continue to use when developing predictive models for alloy properties. This foundational experience has greatly enhanced my ability to tackle complex problems in my current research and pursue innovative solutions.