The automated and accurate results of classifying histopathology images are necessary in the early detection of cancer, especially the common cancers such as Colorectal Cancer (CRC) and Lung Cancer (LC). Nonetheless, classical deep learning frameworks often face challenges because the intra-class variations are large, the relations across classes are alike, and the quality of images is not stable. In order to eliminate these constraints, a multi-layer diagnostic framework is offered in detail. This process starts with a strong preprocessing pipeline, which involves gamma correction, bilateral filtering, and adaptive CLAHE, resulting in statistically significant changes in image quality quantitative measures. The hybrid attention architecture is presented and includes an Xception backbone, a Convolutional Block Attention Module (CBAM), a Transformer block, and an MLP classifier to successfully combine local features with global context. The proposed model achieved an outstanding performance with a classification of 99.98%, 99.58%, and 99.33% percent on LC25000, CRC-VAL-HE-7K, and NCT-CRC-HE-100K when tested on three publicly available datasets. In order to enhance transparency, very detailed explainability analyses are conducted with the help of layer-wise feature visualization and Grad-CAM. Finally, the real-world example of this framework is presented by its implementation in a web-based platform, which can be a useful and easy-to-use tool in helping to diagnose a pathology.
The precise and automated classification of histopathology images is essential for early detection of cancer, particularly for widespread cancers like Colorectal Cancer (CRC) and Lung Cancer (LC). However, traditional deep learning models frequently encounter challenges due to significant intra-class variability, similarities between different classes, and inconsistent image quality. To overcome these limitations, a detailed multi-layer diagnostic framework is proposed. This method begins with a robust preprocessing pipeline that includes gamma correction, bilateral filtering, and adaptive CLAHE, leading to substantial improvements in quantitative metrics of image quality. A deep learning architecture based on hybrid attention mechanisms has been introduced, which integrates an Xception backbone, a Convolutional Block Attention Module (CBAM), a Transformer block, and an MLP classifier to effectively merge local features with global context. When evaluated on three publicly accessible datasets, the proposed model attained exemplary results, reaching classification accuracies of 99.98% on LC-2500, 99.58% on CRC-VAL-HE-7K, and 99.29% on NCT-CRC-HE-100K. To improve transparency, thorough explain ability analyses are performed utilizing layer-wise feature visualization and Grad-CAM. Lastly, the practical application of this framework is showcased through its implementation on a web-based platform, offering a valuable and user-friendly tool to assist in pathological diagnosis.