Cubical Homology-Based Machine Learning: An Application in Image Classification
Abstract
:1. Introduction
2. Basic Definitions
2.1. Simplicial Homology
Chain, Boundary, and Cycle
2.2. Cubical Homology
2.3. Persistent Homology
3. Materials and Methods
3.1. Image Datasets
3.2. Methods—Feature Engineering
Algorithm 1: Extraction of Topological Features. |
Input:N ← number of dataset
for do load image from dataset resize to (200, 200) and convert to grayscale set of points of in persistence diagram of with cubical complex set of points of in persistence diagram of with cubical complex sort in descending order of sort in descending order of project each point in to [0, 1] + project each point in to [1, 2] adapt CLAHE filter to set of points of in persistence diagram of with cubical complex set of points of in persistence diagram of with cubical complex sort in descending order of sort in descending order of + project each point in to [0, 1] + project each point in to [1, 2] + convert to GLCM with distances (1, 2, 3), directions (0, 45, 90, 135), and properties () Output: |
3.3. Projection of Persistence Diagrams
3.4. Contrast Limited Adapting Histogram Equalization (CLAHE)
4. Results and Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Edelsbrunner, H.; Letscher, D.; Zomorodian, A. Topological persistence and simplification. In Proceedings of the 41st Annual Symposium on Foundations of Computer Science, Redondo Beach, CA, USA, 12–14 November 2000; IEEE Computer Society Press: Los Alamitos, CA, USA, 2000; pp. 454–463. [Google Scholar]
- Chazal, F.; Michel, B. An Introduction to Topological Data Analysis: Fundamental and Practical aspects for Data Scientists. arXiv 2017, arXiv:1710.04019. [Google Scholar] [CrossRef]
- Zomorodian, A.; Carlsson, G. Computing persistent homology. Discr. Comput. Geom. 2005, 33, 249–274. [Google Scholar] [CrossRef] [Green Version]
- Carlsson, G. Topology and data. Bull. Am. Math. Soc. 2009, 46, 255–308. [Google Scholar] [CrossRef] [Green Version]
- Edelsbrunner, H.; Harer, J. Persistent homology. A survey. Contemp. Math. 2008, 453, 257–282. [Google Scholar]
- Zomorodian, A.F. Computing and Comprehending Topology: Persistence and Hierarchical Morse Complexes. Ph.D. Thesis, University of Illinois at Urbana-Champaign, Urbana, IL, USA, 2001. [Google Scholar]
- Aktas, M.E.; Akbas, E.; Fatmaoui, A.E. Persistence Homology of Networks: Methods and Applications. arXiv 2019, arXiv:math.AT/1907.08708. [Google Scholar] [CrossRef] [Green Version]
- Garin, A.; Tauzin, G. A topological “reading” lesson: Classification of MNIST using TDA. In Proceedings of the 2019 18th IEEE International Conference On Machine Learning And Applications (ICMLA), Boca Raton, FL, USA, 16–19 December 2019; pp. 1551–1556. [Google Scholar]
- Adams, H.; Chepushtanova, S.; Emerson, T.; Hanson, E.; Kirby, M.; Motta, F.; Neville, R.; Peterson, C.; Shipman, P.; Ziegelmeier, L. Persistence Images: A Stable Vector Representation of Persistent Homology. arXiv 2016, arXiv:cs.CG/1507.06217. [Google Scholar]
- Kramár, M.; Goullet, A.; Kondic, L.; Mischaikow, K. Persistence of force networks in compressed granular media. Phys. Rev. E 2013, 87, 042207. [Google Scholar] [CrossRef] [Green Version]
- Nakamura, T.; Hiraoka, Y.; Hirata, A.; Escolar, E.G.; Nishiura, Y. Persistent homology and many-body atomic structure for medium-range order in the glass. Nanotechnology 2015, 26, 304001. [Google Scholar] [CrossRef] [Green Version]
- Dunaeva, O.; Edelsbrunner, H.; Lukyanov, A.; Machin, M.; Malkova, D.; Kuvaev, R.; Kashin, S. The classification of endoscopy images with persistent homology. Pattern Recognit. Lett. 2016, 83, 13–22. [Google Scholar] [CrossRef]
- Reininghaus, J.; Huber, S.; Bauer, U.; Kwitt, R. A stable multi-scale kernel for topological machine learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 4741–4748. [Google Scholar]
- Iijima, T. Basic theory on the normalization of pattern (in case of typical one-dimensional pattern). Bull. Electro-Tech. Lab. 1962, 26, 368–388. [Google Scholar]
- Bonis, T.; Ovsjanikov, M.; Oudot, S.; Chazal, F. Persistence-based pooling for shape pose recognition. In Proceedings of the International Workshop on Computational Topology in Image Context, Marseille, France, 15–17 June 2016; pp. 19–29. [Google Scholar]
- Dey, T.; Mandal, S.; Varcho, W. Improved image classification using topological persistence. In Proceedings of the Conference on Vision, Modeling and Visualization, Bonn, Germany, 25–27 September 2017; pp. 161–168. [Google Scholar]
- Kindelan, R.; Frías, J.; Cerda, M.; Hitschfeld, N. Classification based on Topological Data Analysis. arXiv 2021, arXiv:cs.LG/2102.03709. [Google Scholar]
- Carrière, M.; Chazal, F.; Ike, Y.; Lacombe, T.; Royer, M.; Umeda, Y. Perslay: A neural network layer for persistence diagrams and new graph topological signatures. In Proceedings of the International Conference on Artificial Intelligence and Statistics (PMLR), Online, 26–28 August 2020; pp. 2786–2796. [Google Scholar]
- Chung, M.K.; Lee, H.; DiChristofano, A.; Ombao, H.; Solo, V. Exact topological inference of the resting-state brain networks in twins. Netw. Neurosci. 2019, 3, 674–694. [Google Scholar] [CrossRef]
- Don, A.P.H.; Peters, J.F.; Ramanna, S.; Tozzi, A. Topological View of Flows Inside the BOLD Spontaneous Activity of the Human Brain. Front. Comput. Neurosci. 2020, 14, 34. [Google Scholar] [CrossRef]
- Don, A.P.; Peters, J.F.; Ramanna, S.; Tozzi, A. Quaternionic views of rs-fMRI hierarchical brain activation regions. Discovery of multilevel brain activation region intensities in rs-fMRI video frames. Chaos Solitons Fractals 2021, 152, 111351. [Google Scholar] [CrossRef]
- Krizhevsky, A.; Sutskever, I.; Hinton, G.E. Imagenet classification with deep convolutional neural networks. Adv. Neural Inf. Process. Syst. 2012, 25, 1097–1105. [Google Scholar] [CrossRef]
- Hofer, C.D.; Kwitt, R.; Niethammer, M. Learning Representations of Persistence Barcodes. J. Mach. Learn. Res. 2019, 20, 1–45. [Google Scholar]
- Umeda, Y. Time series classification via topological data analysis. Inf. Media Technol. 2017, 12, 228–239. [Google Scholar] [CrossRef] [Green Version]
- Pun, C.S.; Xia, K.; Lee, S.X. Persistent-Homology-Based Machine Learning and its Applications—A Survey. arXiv 2018, arXiv:math.AT/1811.00252. [Google Scholar] [CrossRef] [Green Version]
- Allili, M.; Mischaikow, K.; Tannenbaum, A. Cubical homology and the topological classification of 2D and 3D imagery. In Proceedings of the 2001 International Conference on Image Processing (Cat. No. 01CH37205), Thessaloniki, Greece, 7–10 October 2001; Volume 2, pp. 173–176. [Google Scholar]
- Kot, P. Homology calculation of cubical complexes in Rn. Comput. Methods Sci. Technol. 2006, 12, 115–121. [Google Scholar] [CrossRef] [Green Version]
- Strömbom, D. Persistent Homology in the Cubical Setting: Theory, Implementations and Applications. Master’s Thesis, Lulea University of Technology, Lulea, Sweden, 2007. [Google Scholar]
- Choe, S. Cubical homology-based Image Classification-A Comparative Study. Master’s Thesis, University of Winnipeg, Winnipeg, MB, Canada, 2021. [Google Scholar]
- Fisher, M.; Springborn, B.; Schröder, P.; Bobenko, A.I. An algorithm for the construction of intrinsic Delaunay triangulations with applications to digital geometry processing. Computing 2007, 81, 199–213. [Google Scholar] [CrossRef]
- Otter, N.; Porter, M.A.; Tillmann, U.; Grindrod, P.; Harrington, H.A. A roadmap for the computation of persistent homology. EPJ Data Sci. 2017, 6, 1–38. [Google Scholar] [CrossRef] [Green Version]
- Kaczynski, T.; Mischaikow, K.M.; Mrozek, M. Computational Homology; Springer: Berlin/Heidelberg, Germany, 2004. [Google Scholar]
- Kalies, W.D.; Mischaikow, K.; Watson, G. Cubical approximation and computation of homology. Banach Cent. Publ. 1999, 47, 115–131. [Google Scholar] [CrossRef] [Green Version]
- Marchese, A. Data Analysis Methods Using Persistence Diagrams. Ph.D. Thesis, University of Tennessee, Knoxville, TN, USA, 2017. [Google Scholar]
- Özgenel, Ç.F.; Sorguç, A.G. Performance comparison of pretrained convolutional neural networks on crack detection in buildings. In Proceedings of the International Symposium on Automation and Robotics in Construction (ISARC), Berlin, Germany, 20–25 July 2018; Volume 35, pp. 1–8. [Google Scholar]
- Avilés-Rodríguez, G.J.; Nieto-Hipólito, J.I.; Cosío-León, M.d.l.Á.; Romo-Cárdenas, G.S.; Sánchez-López, J.d.D.; Radilla-Chávez, P.; Vázquez-Briseño, M. Topological Data Analysis for Eye Fundus Image Quality Assessment. Diagnostics 2021, 11, 1322. [Google Scholar] [CrossRef]
- Kusrini, K.; Suputa, S.; Setyanto, A.; Agastya, I.M.A.; Priantoro, H.; Chandramouli, K.; Izquierdo, E. Data augmentation for automated pest classification in Mango farms. Comput. Electron. Agric. 2020, 179, 105842. [Google Scholar] [CrossRef]
- Behera, S.K.; Rath, A.K.; Sethy, P.K. Fruit Recognition using Support Vector Machine based on Deep Features. Karbala Int. J. Mod. Sci. 2020, 6, 16. [Google Scholar] [CrossRef]
- Kather, J.N.; Weis, C.A.; Bianconi, F.; Melchers, S.M.; Schad, L.R.; Gaiser, T.; Marx, A.; Zöllner, F.G. Multi-class texture analysis in colorectal cancer histology. Sci. Rep. 2016, 6, 27988. [Google Scholar] [CrossRef]
- Xiao, H.; Rasul, K.; Vollgraf, R. Fashion-MNIST: A Novel Image Dataset for Benchmarking Machine Learning Algorithms. arXiv 2017, arXiv:1708.07747. [Google Scholar]
- Pizer, S.M.; Amburn, E.P.; Austin, J.D.; Cromartie, R.; Geselowitz, A.; Greer, T.; ter Haar Romeny, B.; Zimmerman, J.B.; Zuiderveld, K. Adaptive histogram equalization and its variations. Comput. Vision Graph. Image Process. 1987, 39, 355–368. [Google Scholar] [CrossRef]
- Gadkari, D. Image Quality Analysis Using GLCM. Master’s Thesis, University of Central Florida, Orlando, FL, USA, 2004. [Google Scholar]
- Mohanaiah, P.; Sathyanarayana, P.; GuruKumar, L. Image texture feature extraction using GLCM approach. Int. J. Sci. Res. Publ. 2013, 3, 1–5. [Google Scholar]
- The GUDHI Project. GUDHI User and Reference Manual, 3.4.1 ed.; GUDHI Editorial Board; GUDHI: Nice, France, 2021. [Google Scholar]
- Dlotko, P. Cubical complex. In GUDHI User and Reference Manual, 3.4.1 ed.; GUDHI Editorial Board; GUDHI: Nice, France, 2021. [Google Scholar]
- Paszke, A.; Gross, S.; Massa, F.; Lerer, A.; Bradbury, J.; Chanan, G.; Killeen, T.; Lin, Z.; Gimelshein, N.; Antiga, L.; et al. PyTorch: An Imperative Style, High-Performance Deep Learning Library. In Advances in Neural Information Processing Systems 32; Wallach, H., Larochelle, H., Beygelzimer, A., d’Alché-Buc, F., Fox, E., Garnett, R., Eds.; Curran Associates, Inc.: North Adams, MA, USA, 2019; pp. 8024–8035. [Google Scholar]
- Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine Learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
- Harris, C.R.; Millman, K.J.; van der Walt, S.J.; Gommers, R.; Virtanen, P.; Cournapeau, D.; Wieser, E.; Taylor, J.; Berg, S.; Smith, N.J.; et al. Array programming with NumPy. Nature 2020, 585, 357–362. [Google Scholar] [CrossRef] [PubMed]
- McKinney, W. Data structures for statistical computing in python. In Proceedings of the 9th Python in Science Conference, Austin, TX, USA, 28 June–3 July 2010; Volume 445, pp. 51–56. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
- Mateen, M.; Wen, J.; Song, S.; Huang, Z. Fundus image classification using VGG-19 architecture with PCA and SVD. Symmetry 2019, 11, 1. [Google Scholar] [CrossRef] [Green Version]
- Liu, R.; Wang, F.; Yang, B.; Qin, S.J. Multiscale kernel based residual convolutional neural network for motor fault diagnosis under nonstationary conditions. IEEE Trans. Ind. Inform. 2019, 16, 3797–3806. [Google Scholar] [CrossRef]
- Friedman, J.H. Greedy function approximation: A gradient boosting machine. Ann. Stat. 2001, 29, 1189–1232. [Google Scholar] [CrossRef]
- Chen, T.; He, T.; Benesty, M.; Khotilovich, V.; Tang, Y.; Cho, H. Xgboost: Extreme gradient boosting. R Package Version 0.4-2 2015, 1, 1–4. [Google Scholar]
- Chen, T.; Guestrin, C. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar]
- Ke, G.; Meng, Q.; Finley, T.; Wang, T.; Chen, W.; Ma, W.; Ye, Q.; Liu, T.Y. Lightgbm: A highly efficient gradient boosting decision tree. Adv. Neural Inf. Process. Syst. 2017, 30, 3146–3154. [Google Scholar]
- Patel, V.; Choe, S.; Halabi, T. Predicting Future Malware Attacks on Cloud Systems using Machine Learning. In Proceedings of the 2020 IEEE 6th International Conference on Big Data Security on Cloud (BigDataSecurity), High Performance and Smart Computing, (HPSC) and Intelligent Data and Security (IDS), Baltimore, MD, USA, 25–27 May 2020; pp. 151–156. [Google Scholar]
- Kayed, M.; Anter, A.; Mohamed, H. Classification of garments from fashion MNIST dataset using CNN LeNet-5 architecture. In Proceedings of the 2020 International Conference on Innovative Trends in Communication and Computer Engineering (ITCE), Aswan, Egypt, 8–9 February 2020; pp. 238–243. [Google Scholar]
- Tymchenko, B.; Marchenko, P.; Spodarets, D. Deep learning approach to diabetic retinopathy detection. arXiv 2020, arXiv:2003.02261. [Google Scholar]
Dataset | Size | Num of Classes | Pixel Dimension | Balanced | Time in Sec/Image |
---|---|---|---|---|---|
Concrete 1 | 40,000 | 2 | 227 × 227 | Yes | 0.4713 |
Mangopest 2 | 46,000 | 16 | from 500 × 333 to 1280 × 853 | No | 0.5394 |
Indian fruits 3 | 23,848 | 40 | 100 × 100 | No | 0.4422 |
Fashion MNIST 4 | 60,000 | 10 | 28 × 28 | Yes | 0.4297 |
APTOS 5 | 3662 | 5 | 227 × 227 | No | 0.5393 |
Colorectal histology 6 | 5000 | 8 | 150 × 150 | Yes | 0.3218 |
img | label | glcm1 | glcm2 | ⋯ | glcm24 | dim0_ 0 | dim0_ 1 | ⋯ | dim0_ 99 | dim1_ 0 | dim1_ 1 | ⋯ | dim1_ 99 | fdim0_ 0 | fdim0_ 1 | ⋯ | fdim0_ 143 | fdim1_ 0 | fdim1_ 1 | ⋯ | fdim1_ 143 |
0 | 2 | 0.1603 | 0.1571 | ⋯ | 0.4639 | 1 | 0.0366 | ⋯ | 0 | 1.2054 | 1.1815 | ⋯ | 0 | 0.9999 | 0.2060 | ⋯ | 0.0319 | 1.7698 | 1.6339 | ⋯ | 1.1067 |
⋮ | |||||||||||||||||||||
3661 | 2 | 0.1196 | 0.1160 | ⋯ | 0.5387 | 0.9999 | 0.0020 | ⋯ | 0 | 1.4787 | 1.0636 | ⋯ | 0 | 0.9999 | 0.1295 | ⋯ | 0.0042 | 1.9493 | 1.3658 | ⋯ | 1.10478 |
ResNet 1D | CART | GBM | LightGBM | Random Forest | SVM | XGBoost | kNN | Related Works—Benchmark | ||
---|---|---|---|---|---|---|---|---|---|---|
Accuracy | 0.994 | 0.989 | 0.991 | 0.9945 | 0.993 | 0.956 | 0.9935 | 0.890 | 0.999 with CNN [35] | |
Concrete | Weighted F1 | 0.994 | 0.988 | 0.989 | 0.994 | 0.992 | 0.955 | 0.993 | 0.884 | |
Run time | 465.87 | 9.08 | 252.15 | 11.25 | 7.63 | 214.05 | 59.15 | 1.93 | ||
Accuracy | 0.931 | 0.764 | 0.681 | 0.898 | 0.869 | 0.474 | 0.889 | 0.666 | 0.76 with CNN [37] | |
Mangopest | Weighted F1 | 0.931 | 0.764 | 0.676 | 0.898 | 0.869 | 0.439 | 0.889 | 0.663 | |
Run time | 760.94 | 17.17 | 5562.09 | 260.62 | 13.94 | 662.45 | 2041.22 | 2.33 | ||
Accuracy | 1.000 | 0.9608 | 0.9608 | 0.9608 | 0.9608 | 0.7313 | 0.9608 | 0.676 | 0.999 SVM with | |
Indian fruits | Weighted F1 | 1.000 | 0.9608 | 0.9608 | 0.9608 | 0.9608 | 0.7236 | 0.9608 | 0.656 | deep features [38] |
Run time | 271.21 | 4.44 | 4265.09 | 82.55 | 4.13 | 72.73 | 451.65 | 1.18 | ||
Accuracy | 0.7427 | 0.567 | 0.696 | 0.749 | 0.693 | 0.535 | 0.746 | 0.397 | 0.99 with CNN [58] | |
Fashion MNIST | Weighted F1 | 0.7414 | 0.569 | 0.694 | 0.749 | 0.692 | 0.529 | 0.746 | 0.390 | |
Run time | 467.12 | 8.36 | 1808.07 | 89.37 | 7.66 | 935.21 | 1108.20 | 3.38 | ||
Accuracy | 0.7326 | 0.698 | 0.760 | 0.787 | 0.782 | 0.674 | 0.775 | 0.655 | 0.971 with CNN [59] | |
APTOS | Weighted F1 | 0.667 | 0.695 | 0.737 | 0.771 | 0.757 | 0.591 | 0.764 | 0.637 | |
Run time | 61.81 | 0.63 | 86.02 | 13.16 | 0.70 | 3.49 | 42.34 | 0.08 | ||
Accuracy | 0.892 | 0.75 | 0.842 | 0.869 | 0.855 | 0.679 | 0.874 | 0.759 | 0.874 with SVM [39] | |
Colorectal histology | Weighted F1 | 0.89 | 0.727 | 0.832 | 0.850 | 0.834 | 0.686 | 0.843 | 0.743 | |
Run time | 86.23 | 1.18 | 255.08 | 12.52 | 1.10 | 4.06 | 44.63 | 0.14 | ||
Accuracy | 0.882 ± 0.109 | 0.789 ± 0.147 | 0.822 ± 0.121 | 0.876 ± 0.087 | 0.856 ± 0.102 | 0.675 ± 0.154 | 0.873 ± 0.90 | 0.674 ± 0.148 | ||
Weighted F1 | 0.871 ± 0.125 | 0.784 ± 0.148 | 0.815 ± 0.124 | 0.870 ± 0.091 | 0.851 ± 0.105 | 0.654 ± 0.164 | 0.866 ± 0.092 | 0.662 ± 0.147 |
Colorectal Histology Dataset | APTOS Dataset | |
---|---|---|
GLCM+TDA | 0.892 | 0.7326 |
TDA | 0.7697 | 0.6739 |
GLCM | 0.694 | 0.7252 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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
Choe, S.; Ramanna, S. Cubical Homology-Based Machine Learning: An Application in Image Classification. Axioms 2022, 11, 112. https://doi.org/10.3390/axioms11030112
Choe S, Ramanna S. Cubical Homology-Based Machine Learning: An Application in Image Classification. Axioms. 2022; 11(3):112. https://doi.org/10.3390/axioms11030112
Chicago/Turabian StyleChoe, Seungho, and Sheela Ramanna. 2022. "Cubical Homology-Based Machine Learning: An Application in Image Classification" Axioms 11, no. 3: 112. https://doi.org/10.3390/axioms11030112