Table 1: The quantitative results of models.
M Model 1 Model 2 Model 3 Model 4
Error level Sample Image Sample Image Sample Image Sample Image
FP 31,9% 21,5% 31,9% 22,6% 45,7% 31,3% 31,3% 21,2%
FN 2,4% 5,1% 2,6% 5,2% 1,9% 3,8% 2,4% 5,1%
6 RESULTS
To evaluate the performance of our model 1000 addi-
tional samples were gathered, which were evaluated
by a skilled human inspector. The ∼ 30% of sam-
ples has scratches. Model quality performance calcu-
lations based on a sample level (decision for sample)
and image (decision for each position) level.
Since our model consists of several contributions,
we performed three experiments and obtained the fol-
lowing models: without nested weights with pro-
posed “auto-encoder” loss (1), model with ResNet-
34 as a backbone (2), full model with nested weights
and cross-entropy loss (3) and full model with nested
weights and “auto-encoder” loss (4). The quantita-
tive results of FP and FN of applying each model are
shown in Table 1. Model 1, 2 and 4 show practically
the same results, but proposed model has a smaller
amount of weights, what helps to avoid overfitting.
Total estimated time needed to check one sample
is about 8 seconds. For the inference we used the
same GPU. Note that in the production line a human
inspector spends ∼20 seconds to check one sample,
and one sample is checked 5 times. For the produc-
tion line the FN ratio is more important, because a
product with defects in no case should go to the con-
sumer. And there is no so big cost to reproduce an
overkilled (FP) sample.
Therefore, although our model doesn’t give abso-
lute accuracy, it allows to reduce the amount of times
which needed to check one sample and the final cost
of the product.
7 CONCLUSION
We have presented full pipeline of smartphone cover
glass surface inspection. Our solution consists of a
setup based on directional illumination to highlight
scratches on dark field images, which allows us to
distinguish scratches from contaminants, and CNN-
based method for scratch detection. The dataset of
cover glass samples images was gathered and labeled
(∼ 11000). We have utilized a special loss technique,
to overcome problem of extremely high data imbal-
ance. Nested convolution kernels approach, which al-
lows to reduce the amount of weights and achieve re-
ceptive field covered full patch during training with-
out any risk of overfitting was presented. Our system
was tested in real production line. The results show
that our solution really may help to reduce resources
which are needed for sample inspection.
REFERENCES
Bayer, B. (1976). Color imaging array.
Buslaev, A. V., Parinov, A., Khvedchenya, E., Iglovikov,
V. I., and Kalinin, A. A. (2018). Albumenta-
tions: fast and flexible image augmentations. CoRR,
abs/1809.06839.
Chen, L., Zhu, Y., Papandreou, G., Schroff, F., and Adam,
H. (2018). Encoder-decoder with atrous separable
convolution for semantic image segmentation. CoRR,
abs/1802.02611.
Chen, T., Li, M., Li, Y., Lin, M., Wang, N., Wang, M.,
Xiao, T., Xu, B., Zhang, C., and Zhang, Z. (2015).
Mxnet: A flexible and efficient machine learning li-
brary for heterogeneous distributed systems. CoRR,
abs/1512.01274.
Ester, M., Kriegel, H.-P., Sander, J., and Xu, X. (1996).
A density-based algorithm for discovering clusters in
large spatial databases with noise. pages 226–231.
AAAI Press.
Etzold, F., Kiefhaber, D., Warken, A., W
¨
urtz, P., Hon,
J., and Asfour, J.-M. (2016). A novel approach to-
wards standardizing surface quality inspection. page
1000908.
Glorot, X. and Bengio, Y. (2010). Understanding the diffi-
culty of training deep feedforward neural networks. In
In Proceedings of the International Conference on Ar-
tificial Intelligence and Statistics (AISTATS’10). Soci-
ety for Artificial Intelligence and Statistics.
Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B.,
Warde-Farley, D., Ozair, S., Courville, A., and Ben-
gio, Y. (2014). Generative adversarial nets. In Ghahra-
mani, Z., Welling, M., Cortes, C., Lawrence, N. D.,
and Weinberger, K. Q., editors, Advances in Neu-
ral Information Processing Systems 27, pages 2672–
2680. Curran Associates, Inc.
He, K., Zhang, X., Ren, S., and Sun, J. (2015). Deep
residual learning for image recognition. CoRR,
abs/1512.03385.
Jiang, X., Yang, X., Ying, Z., Zhang, L., Pan, J., and Chen,
S. (2018). Segmentation of shallow scratches im-
age using an improved multi-scale line detection ap-
proach. Multimedia Tools and Applications, 78.
Kingma, D. P. and Ba, J. (2014). Adam: A
method for stochastic optimization. cite
ICAART 2021 - 13th International Conference on Agents and Artificial Intelligence
662