PurposeCracks on surface are often identified as one of the early indications of damage and possible future catastrophic structural failure. Thus, detection of cracks is vital for the timely inspection, health diagnosis and maintenance of infrastructures. However, conventional visual inspection-based methods are criticized for being subjective, greatly affected by inspector's expertise, labor-intensive and time-consuming.Design/methodology/approachThis paper proposes a novel self-adaptive-based method for automated and semantic crack detection and recognition in various infrastructures using computer vision technologies. The developed method is envisioned on three main models that are structured to circumvent the shortcomings of visual inspection in detection of cracks in walls, pavement and deck. The first model deploys modified visual geometry group network (VGG19) for extraction of global contextual and local deep learning features in an attempt to alleviate the drawbacks of hand-crafted features. The second model is conceptualized on the integration of K-nearest neighbors (KNN) and differential evolution (DE) algorithm for the automated optimization of its structure. The third model is designated for validating the developed method through an extensive four layers of performance evaluation and statistical comparisons.FindingsIt was observed that the developed method significantly outperformed other crack and detection models. For instance, the developed wall crack detection method accomplished overall accuracy, F-measure, Kappa coefficient, area under the curve, balanced accuracy, Matthew's correlation coefficient and Youden's index of 99.62%, 99.16%, 0.998, 0.998, 99.17%, 0.989 and 0.983, respectively.Originality/valueLiterature review lacks an efficient method which can look at crack detection and recognition of an ensemble of infrastructures. Furthermore, there is absence of systematic and detailed comparisons between crack detection and recognition models.