# A Deep Learning Technique for Optical Inspection of Color Contact Lenses
## 1 Introduction  
Soft contact lenses have traditionally been worn for vision correction; however, their application has been recently expanded to healthcare and beauty products, including drug delivery and cosmetic colored contact lenses [1; 2; 3; 4; 5]. Colored contact lenses, such as those shown in Figure 1, have gained popularity among people wishing to change or enhance the color and beauty of their eyes. Consequently, the market for colored contact lenses has been growing rapidly. The colored contact lens manufacturing process involves several steps: molding, coloring, curing, and coating. Each of these steps can result in the introduction of defects or inconsistencies that may not be visible until the final inspection [6; 7]. Most colored contact lenses are inspected manually by human inspectors. However, manual inspection is limited by human error and can be time- and resource-consuming. In addition, accurate inspection can be challenging owing to the colored contact lenses having complex designs and various colors, including multiple color and gradation layers. This renders the detection of defects or inconsistencies that occur during the manufacturing process challenging. Moreover, subtle imperfections in colored contact lenses that are difficult to observe with the naked eye, such as bubbles, scratches, and uneven pigmentation, may not be immediately noticeable. However, this may affect the wearer's vision or cause discomfort. Therefore, the production and distribution of high-quality colored contact lenses to end users is difficult.  
Overall, the complexity of the color patterns and the potential for subtle defects render the inspection of colored contact lenses challenging. Consequently, automatic optical inspection (AOI) systems have been developed to perform quality-control checks on colored contact lenses. In a previous study [8], a video camera was installed to automatically measure the back surface characteristics of the produced contact lenses. The images acquired via the camera were used to measure the surface finish, toxicity, and eccentricity of the back surface of the lenses. In another study [9], an AOI system for lens defect detection was constructed, comprising a light source and camera. It employed an image-processing algorithm for defect detection and was designed to detect five types of defects via the algorithm using images captured by the camera. The systems in these studies [8; 9] produced relatively accurate inspection results compared with those obtained through existing manual inspection. However, their accuracy can be limited by the complexity of the lens color patterns. The use of AOI systems with deep learning algorithms that train with contact lens defects can aid in improving the accuracy of manual lens defect detection by learning and identifying defects in colored contact lenses with high accuracy. This can provide a more accurate and efficient inspection process, reduce inspection time, and improve feasibility. However, certain challenges are involved in implementing these systems, such as the requirement of extensive training data and the potential for overfitting.  
This study aims to provide a comprehensive guide for AOI systems using a convolutional neural network (CNN) in colored contact lens manufacturing, including the benefits and challenges of using these systems and future research directions in this field.