This study presents a deep convolutional neural network (DeepCNN) based framework for the automatic estimation of porosity in concrete materials from two-dimensional computed tomography (2D CT) scan images. Addressing the limitations of manual and time-consuming traditional porosity measurement methods, the proposed approach integrates advanced image processing techniques to improve robustness under low resolution and noisy imaging conditions. The DeepCNN architecture comprises a multi stage feature extractor with 21 convolutional layers and an SPP based neck, trained on 20,520 annotated CT images after data augmentation. Preprocessing steps include automated region of interest detection, intensity normalization, and class specific filtering prior to porosity estimation. The framework performs material classification and porosity estimation across multiple concrete classes, including cement-based mortars (CM0, CM5, CM10, CM20), geopolymer based mortar (GM), and ultra-high performance concrete (UHPC), using a rule based adaptive thresholding (RBAT) strategy incorporating clustering, filtering, and thresholding operations. Porosity is quantified by computing the ratio of pore area to the total image area. Across all material classes, the estimated porosity values showed close agreement with vacuum pycnometer measurements, with deviations within 2–3%, including deviations of 1.5% for UHPC and 1.3% for CM10. The DeepCNN classifier achieved a precision recall AUC of 1.0 during testing. These results demonstrate that the proposed hybrid framework provides an accurate, automated, and computationally efficient solution for porosity assessment, suitable for practical and industrial CT based material characterization workflows.