Autonomous Face Classification Online Self-Training System Using Pretrained ResNet50 and Multinomial Naïve Bayes
Abstract
:1. Introduction
2. Description of Used Methods
2.1. ResNet50 Model
- x is the input vector;
- y is the output vector;
- represents the residual mapping to be learned.
- σ—denotes ReLU without biases (for simplification).
2.2. Naïve Bayes Classifier
2.3. Support Vector Machines
3. Initial Experiments
3.1. Detection and Encoding of Input Faces
3.2. Choosing the Proper Classification Model
4. Description of the Created System
4.1. Cognitive Tracking Agents
- Novelty detection stage: in this stage, the novelty detection algorithm is working and detects if a given face is novel (not existing in the set of classes trained earlier) over N0 = 10 samples. In the case of novelty, the agent switches to stage 1. Otherwise, the agent switches to stage 3;
- Initial training stage: in this stage, the vectors (encoded face images) collected since the tracking agent started working are used to train a new class. In this stage, a label for a new class is established and saved in the agent. After initial training using samples collected during the agent working, this agent switches to stage 2;
- Continuation of training stage: this stage uses new samples for training a given class, using the label established in the previous stage and new vectors. After training using N1 = 10 samples, the agent switches to stage 4 (because now the label of the face is known, the 3rd stage can be omitted);
- Initial recognition stage: the agent predicts the existing (not novel) class, using a dominant label calculated based on a set of collected samples (at least N2 = 5) in this stage. If most of the predictions are from the same label, then the label is saved as recognized, and the agent switches to stage 4;
- Analyzing stage: the agent is analyzing predictions of the known face, and when the predictions are different from the proper label, it updates the model using the wrongly recognized sample with the proper label;
- Removement stage: the agent switches to this stage from any other stage if the tracked face disappears and then after N3 = 10 frames without the face being detected close to tracking the last position. The agent in this stage is nonactive and will be removed by the system from the agents lists.
4.2. Novelty Detection Algorithm
5. Testing of the Created System on Video with Realistic Scenes
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Ahmad, S.; Hawkins, J. Properties of Sparse Distributed Representations and their Application to Hierarchical Temporal Memory. arXiv 2015, arXiv:1503.07469. [Google Scholar]
- Starzyk, J.A.; Maciura, Ł.; Horzyk, A. Associative Memories with Synaptic Delays. IEEE Trans. Neural Netw. Learn. Syst. 2020, 31, 331–344. [Google Scholar] [CrossRef] [PubMed]
- Starzyk, J.A.; Jaszuk, M.; Maciura, Ł.; Horzyk, A. Concurrent Associative Memories with Synaptic Delays. IEEE Trans. Neural Netw. Learn. Syst. 2021, 32, 3736–3747. [Google Scholar] [CrossRef] [PubMed]
- Huang, D.; Peng, Z. Unsupervised Face Recognition via Meta—Learning. 2020. Available online: https://cs330.stanford.edu (accessed on 3 April 2023).
- Boutros, F.; Klemt, M.; Fang, M.; Kuijper, A.; Damer, N. Unsupervised Face Recognition using Unlabeled Synthetic Data. arXiv 2022, arXiv:2211.07371v1. [Google Scholar]
- Therasa, M.; Poonkuzhali, S.; Hemapriya, K.; Raja, S. Face Recognition Using Unsupervised Feature Learning (UFL) Approach. Middle-East J. Sci. Res. 2016, 24, 238–242. [Google Scholar]
- Japkowicz, N.; Myers, C.; Gluck, M. A Novelty Detection Approach to Classification. ICAI 1995, 1, 518–523. [Google Scholar]
- Kliger, M.; Fleishman, S. Novelty Detection with GAN. arXiv 2018, arXiv:1802.10560. [Google Scholar]
- Dornaika, F. Multi-similarity semi-supervised manifold embedding for facial attractiveness scoring. Soft Comput. 2023, 27, 5099–5108. [Google Scholar] [CrossRef]
- Fekri-Ershad, S. Gender Classification in Human Face Images for Smart Phone Applications Based on Local Texture Information and Evaluated Kuulback Leibler Divergence. Traitement Du Signal 2019, 36, 507–514. [Google Scholar] [CrossRef]
- Surinwarangkoon, T.; Hoang, V.T.; Vafaei-Zadeh, A.; Hendi, H.I.; Meethongjan, K. Realtime face matching and gender prediction based on deep learning. Int. J. Electr. Comput. Eng. 2023, 13, 4068–4075. [Google Scholar] [CrossRef]
- Caleanu, C.-D.; Mao, X.; Predel, G.; Moga, S.; Xue, Y. Combined pattern search optimization of feature extraction and classification parameters in facial recognition. Patter Recognit. Lett. 2011, 32, 1250–1255. [Google Scholar] [CrossRef]
- Belouadah, E.; Popescu, A.; Kanellos, I. A comprehensive study of class incremental learning algorithms for visual tasks. Neural Netw. 2020, 135, 38–54. [Google Scholar] [CrossRef] [PubMed]
- Li, L.; Jun, Z.; Fei, J.; Li, S. An Incremental Face Recognition System Based on Deep Learning. In Proceedings of the 2017 Fifteenth IAPR International Conference on Machine Vision Applications (MVA), Nagoya, Japan, 8–12 May 2017. [Google Scholar]
- Montiel, J.; Halford, M.; Martiello, S.M.; Bolmier, G.; Sourty, R.; Vaysse, R.; Zouitine, A.; Heitor Murilo, G.; Read, J.; Abdessalem, T.; et al. River: Machine learning for streaming data in Python. J. Mach. Learn. Res. 2021, 22, 4945–4952. [Google Scholar]
- VowpalWabbit Machine Learning System. Available online: https://github.com/VowpalWabbit/vowpal_wabbit (accessed on 25 May 2023).
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar] [CrossRef] [Green Version]
- Ismail, M.; Hassan, N.; Bafjaish, S. Comparative Analysis of Naïve Bayesian Techniques in Health—Related for Classification Task. J. Soft Comput. Data Min. 2020, 1, 1–10. [Google Scholar]
- Singh, G.; Kumar, B.; Gaur, L.; Tyagi, A. Comparison between Multinomial and Bernoulli Naïve Bayes for Text Classification. In Proceedings of the International Conference on Automation Computational and Technology Management (ICACTM), London, UK, 24–26 April 2019. [Google Scholar]
- Seref, B.; Bostanci, E. Performance of Naïve and Complement Naïve Bayes Algorithms Based on Accuracy, Precision and Recall Performance Evaluation Criterions. Int. J. Comput. Acad. Res. 2019, 8, 75–92. [Google Scholar]
- Bi, Z.-J.; Han, Y.-Q.; Huang, C.-Q.; Wang, M. Gaussian Naive Bayesian Data Classification Model Based on Clustering Algorithm. In Proceedings of the 2019 International Conference on Modeling, Analysis, Simulation Technologies and Applications (MASTA 2019), Hangzhou, China, 26–27 May 2019; Atlantis Press: Amsterdam, The Netherlands. [Google Scholar] [CrossRef] [Green Version]
- Cortes, C. Support—Vector Networks. Mach. Learn. 1995, 20, 273–297. [Google Scholar] [CrossRef]
- Evgeniou, T.; Pontil, M. Support Vector Machines: Theory and Applications. In Machine Learning and Its Applications, Advanced Lectures; Springer: Berlin/Heidelberg, Germany, 2001. [Google Scholar] [CrossRef] [Green Version]
- Viola, P.; Jones, M.J. Jones, Robust real—Time face detection. Int. J. Comput. Vis. 2004, 57, 137–154. [Google Scholar] [CrossRef]
- Cao, Q.; Shen, L.; Xie, W.; Parkhi, O.M.; Zisserman, A. VGGFace2: A dataset for recognizing face across pose and age. In Proceedings of the International Conference on Automatic Face and Gesture Recognition, Xi’an, China, 15–19 May 2018. [Google Scholar]
- Available online: https://github.com/WeidiXie/Keras-VGGFace2-ResNet50 (accessed on 26 October 2022).
- Available online: https://www.kaggle.com/datasets/hereisburak/pins-face-recognition (accessed on 1 February 2023).
- Diab, S. Optimizing Stochastic Gradient Descent in Text Classification Based on Fine-Tuning Hyper-Parameters Approach. Int. J. Comput. Sci. Inf. Secur. 2018, 16, 155–160. [Google Scholar]
- Breiman, L.; Friedman, J.; Olshen, R.; Stone, C. Classification and Regression Trees; Wadsworth & Brooks: Pacific Grove, CA, USA, 1984. [Google Scholar]
- Geurts, P.; Ernst, D.; Wehenkel, L. Extremely randomized trees. Charine Learn. 2006, 63, 3–42. [Google Scholar] [CrossRef] [Green Version]
- Kartynnik, Y.; Ablavatski, A.; Grishchenko, I. Grundmann, Real—Time Facial Surface Geometry from Monocular Video on Mobile GPUs. arXiv 2019, arXiv:1907.06724. [Google Scholar]
- Available online: https://www.youtube.com/watch?v=ZWZX-tDgcQE (accessed on 16 February 2023).
- Available online: https://www.youtube.com/watch?v=AYKGGVfCCZ0 (accessed on 4 May 2023).
Classifier | Test Accuracy | Update Possibility | Training 1 Sample [ms] |
---|---|---|---|
Multinomial Naïve Bayes | 99.3761% | Yes | 0.0101 |
Bernoulli Naïve Bayes | 98.8656% | Yes | 0.0278 |
Complement Naïve Bayes | 89.5065% | Yes | 0.0119 |
Gaussian Naïve Bayes | 95.0085% | Yes | 0.0089 |
MLP | 98.1282% | Yes | 0.8054 |
SGD | 98.5820% | Yes | 2.2758 |
SVM | 99.3193% | No | 1.8799 |
Decision tree | 62.7907% | No | 11.8947 |
Extra tree | 98.2984% | No | 1.4032 |
Person Name | Photos Represents Tracking Agents for Identified or Created Classes |
---|---|
Person105 | (A0, PA, 1.0), (A2, PA, 0.3) |
Person106 | (A1, PB, 0.9) |
Person107 | (A3,PC,1.0), (A4,PC,0.0), (A5,PC,0.0), (A6,PC,0.8) |
Person108 | (A8,PD,1.0) |
Person109 | (A9,PE,1.0) |
Person110 | (A15,PF,1.0), (A23,PF,0.0) |
Person111 | (A22,PG,1.0), (A28,PG,0.0), (A33,PG,0.0) |
Person112 | (A26,PH,1.0), |
Person113 | (A29,PF,1.0), (A30,PF,0.0),(A32,PF,0.0),(A38,PF,0.0) |
Person114 | (A34,PI,1.0), (A35,PI,0.0), (A37,PI,0.0) |
Person115 | (A36,PJ,1.0) |
Person Name | Photos Represent Tracking Agents for Identified or Created Classes |
---|---|
Person105 | (A0,PA,1.0), (A14, PA,0.0), (A28,PA,0.0), (A37,PA,0.0), (A54,PA,0.0), (A58,PA,0.0) |
Person106 | (A1,PB,1.0), (A17,PB,0.0), (A22,PB,0.0), (A35,PB,0.0), (A56,PB,0.0), (A66,PB,0.0) |
Person107 | (A2,PC,1.0), (A18,PC,0.0), (A25,PC,0.0), (A39,PC,0.0), (A46,PC,0.0), (A46,PC,0.0), (A60,PC,0.0) |
Person108 | (A3,PD,1.0), (A15,PD,0.0), (A26,PD,0.0), (A42,PD,0.0), (A53,PD,0.0), (A62,PD,0.0) |
Person109 | (A4,PE,1.0), (A19,PE,0.0), (A29,PE,0.0), (A36,PE,0.0), (A49,PE,0.0), (A68,PE,0.0) |
Person110 | (A5,PF,1.0), (A16,PF,0.0), (A23,PF,0.0), (A41,PF,0.0), (A52,PF,0.0), (A67,PF,0.0) |
Person111 | (A6,PG,1.0), (A20,PG,0.0), (A31,PG,0.0), (A32,PG,0.0), (A33,PG,0.0), (A45,PG,0.0), (A48,PG,0.0), (A57,PG,0.0) |
Person112 | (A7,PH,1.0), (A13,PH,0.0), (A34,PH,0.0), (A44,PH,0.0), (A50,PH,0.0), (A65,PH,0.0) |
Person113 | (A8,PI,1.0), (A12,PI,0.0), (A30,PI,0.0), (A43,PI,0.0), (A51,PI,0.0), (A61,PI,0.0) |
Person114 | (A9,PJ,1.0), (A11,PJ,0.0), (A27,PJ,0.0), (A38,PJ,0.0), (A47,PJ,0.0), (A59,PJ,0.0) |
Person115 | (A10,PK,1.0), (A21,PK,0.0), (A24,PK,0.0), (A40,PK,0.0), (A55,PK,0.0), (A64,PK,0.0) |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Maciura, Ł.; Cieplak, T.; Pliszczuk, D.; Maj, M.; Rymarczyk, T. Autonomous Face Classification Online Self-Training System Using Pretrained ResNet50 and Multinomial Naïve Bayes. Sensors 2023, 23, 5554. https://doi.org/10.3390/s23125554
Maciura Ł, Cieplak T, Pliszczuk D, Maj M, Rymarczyk T. Autonomous Face Classification Online Self-Training System Using Pretrained ResNet50 and Multinomial Naïve Bayes. Sensors. 2023; 23(12):5554. https://doi.org/10.3390/s23125554
Chicago/Turabian StyleMaciura, Łukasz, Tomasz Cieplak, Damian Pliszczuk, Michał Maj, and Tomasz Rymarczyk. 2023. "Autonomous Face Classification Online Self-Training System Using Pretrained ResNet50 and Multinomial Naïve Bayes" Sensors 23, no. 12: 5554. https://doi.org/10.3390/s23125554
APA StyleMaciura, Ł., Cieplak, T., Pliszczuk, D., Maj, M., & Rymarczyk, T. (2023). Autonomous Face Classification Online Self-Training System Using Pretrained ResNet50 and Multinomial Naïve Bayes. Sensors, 23(12), 5554. https://doi.org/10.3390/s23125554