Skip to main content
Scientific Reports logoLink to Scientific Reports
. 2026 May 2;16:20362. doi: 10.1038/s41598-026-50580-5

Detection of benign prostatic hyperplasia using RGB prostate images and deep learning

Rohit Srivastava 1, Rishita Kumar 2, Surya Kant 3, Harish Kumar Shakya 4,✉
PMCID: PMC13332049  PMID: 42069861

Abstract

This study investigates the identification of Benign Prostatic Hyperplasia (BPH) through a deep learning-based analysis of RGB prostate histopathological images. Adaptive Contrast Limited Adaptive Histogram Equalization (CLAHE) is selectively applied to the L-channel in the LAB color space to enhance tissue visibility while preserving chromatic fidelity. At the architectural level, Convolutional Neural Networks (CNNs) are integrated with Bidirectional Long Short-Term Memory (BiLSTM) layers, enhanced further through spatial and temporal attention mechanisms. This hybrid design facilitates both localized pattern recognition and the modeling of long-range contextual dependencies across tissue regions. To mitigate class imbalance and prevent overfitting, the training regime incorporates two key strategies: an adaptive focal loss function and a comprehensive image augmentation protocol. The proposed model achieved an AUC of 0.7220 on the validation set and an AUC of 0.73 on the test set. While the precision for normal tissue classification remained high, the recall for BPH detection highlighted the need for improvement in sensitivity. The proposed CNN–BiLSTM–Attention architecture demonstrates potential as a diagnostic aid in digital pathology, offering interpretable insights and forming a foundation for enhancing histological classification systems. Future work will focus on improving recall performance for BPH detection and expanding the architecture to support multi-class prostate disease grading frameworks. This study utilizes an RGB histopathological dataset consisting of 176 prostate images, each appropriately annotated. The model demonstrates moderate classification performance and a moderate true-positive rate for detecting Normal samples. The model, however, has a low sensitivity in the detection of the cases of BPH as indicated by the relatively low recall values.

Subject terms: Computational biology and bioinformatics, Engineering, Mathematics and computing, Urology

Introduction

Benign Prostatic Hyperplasia (BPH) exists as a non-invasive prostate gland growth that affects numerous older males at a high rate. BPH incidence rises dramatically among men during aging because clinical prevalence counts show that 50% of men in their 50s to 60s have BPH and more than 80% of men after age 70 develop the condition. The non-malignant prostate growth leading to BPH enlarges the prostate which generates lower urinary tract symptoms (LUTS) including frequent urination as well as urgent and inhibited voiding, weak urinary streams, and repeated night-time bathroom use.

Lower urinary tract symptoms from prostate enlargement lead to major reductions in patient quality of life, resulting in extensive healthcare expenses and a growing need for specialized urological care. The diagnosis of BPH needs to be both accurate and prompt, as its detection facilitates timely therapeutic intervention and helps distinguish BPH from prostate cancer, such as adenocarcinoma. The standard diagnostic approach to BPH evaluation depends on clinical history along with physical examinations, particularly digital rectal examination (DRE), as well as tests for serum prostate-specific antigen (PSA), uroflowmetry, post-void residual volume measurement, and transabdominal or transrectal ultrasound evaluations. Medical practitioners face significant limitations in these conventional diagnostic procedures due to subjectivity and inter-observer variability, along with limited sensitivity in detecting early morphological changes in prostatic tissue1.

While magnetic resonance imaging (MRI) offers superior visualization of soft tissues, its implementation in routine diagnosis is limited by high costs and lack of availability, especially in resource-limited or developing regions. As a result, there is a growing demand in modern healthcare for advanced automated diagnostic tools that leverage widely available imaging techniques to assist clinicians in accurately identifying BPH.

The Scopus database shows that research papers about medical imaging AI experienced substantial growth from 2015 to 2024 and reached more than 10,000 publications in 2024 as Fig. 1 demonstrates. Research and innovation toward new discoveries in this field require increased focus since Benign Prostatic Hyperplasia (BPH) represents an underexplored research area.

Fig. 1.

Fig. 1

Trend of AI in Medical Imaging from 2015 to 2025 till 5-05-2025. The data shows a consistent increase in research publications, indicating the growing academic and clinical interest in AI-powered diagnostic tools (Source: Scopus database).

However, the application of such AI techniques for BPH classification using RGB-based prostate histopathological or imaging data remains underexplored. Limited research interest, coupled with a lack of large, publicly available datasets related to benign prostatic conditions, has contributed to a significant knowledge gap. Compared to malignant conditions like prostate adenocarcinoma, benign conditions such as BPH receive relatively less attention in the research community, hindering progress in developing reliable automated diagnostic tools.

The study aims to address the existing research gap by developing a novel deep learning-based diagnostic system capable of identifying Benign Prostatic Hyperplasia (BPH) from RGB prostate images. We utilize the “A Diagnostic Imaging Dataset for Benign Prostatic Hyperplasia Classification” dataset, which includes 176 clinically annotated RGB images labeled as either Normal or BPH. These images were collected in a clinical setting in Bangladesh and correspond to RGB histopathological images obtained from hematoxylin and eosin (H&E) stained slides. The staining process highlights cellular nuclei and cytoplasmic structures, enabling clear visualization of glandular morphology and stromal patterns relevant to BPH diagnosis.

Our research serves as a foundation for benign prostatic condition analysis using low-cost imaging modalities that are scalable, making the system suitable for deployment in resource-constrained clinical environments.

The proposed methodology integrates multiple technical innovations. The preprocessing pipeline begins with the extraction of quality-assessed image patches based on tissue content and contrast criteria. This is followed by adaptive Contrast Limited Adaptive Histogram Equalization (CLAHE) to enhance glandular structures and mitigate lighting inconsistencies across the dataset.

The classification model architecture combines Convolutional Neural Networks (CNNs) for spatial feature extraction with Bidirectional Long Short-Term Memory (BiLSTM) layers, allowing the system to model sequential dependencies across patches. An attention mechanism is incorporated to prioritize the most relevant regions, enhancing the model’s ability to integrate spatial and contextual information. This hybrid CNN-BiLSTM-Attention architecture improves both feature richness and decision interpretability.

To address class imbalance—a common issue in medical datasets—the model employs an adaptive focal loss function. This loss function dynamically reweights hard-to-classify samples within each training batch, enhancing learning stability and performance.

Generalization is further improved through extensive data augmentation techniques. These include geometric transformations (e.g., rotations, flips), brightness adjustments, and zooming operations to simulate variations encountered in clinical imaging2.

The proposed model demonstrates modest improvement over conventional CNN baselines while maintaining moderate overall classification performance, achieving results comparable to baseline accuracy while maintaining competitive recall and Area Under the Curve (AUC) metrics. Notably, the model achieves this without relying on test-time augmentation strategies or multiple-view data, highlighting its simplicity and efficiency. These findings validate the feasibility of using lightweight deep learning architectures for BPH detection from individual RGB prostate images, an approach that is particularly advantageous in resource-constrained clinical settings and telemedicine environments. Compared to previous studies on CNN-only models for malignant prostate, our new model joins attention strategies to address benign prostate cancer using RGB histology data which is not often examined.

The medical field has undergone significant transformation with the advent of Deep Learning (DL), which enables automatic feature extraction and supports accurate image classification and segmentation. In particular, Convolutional Neural Networks (CNNs) have demonstrated strong performance in medical imaging tasks such as tumor detection3, diabetic retinopathy grading4, and lung disease diagnosis5. By learning features directly from raw pixel data, DL models eliminate the need for handcrafted features and enable end-to-end disease detection systems.

Despite the rapid advancements in DL for medical imaging, its application in diagnostic systems for Benign Prostatic Hyperplasia (BPH) remains underexplored and underutilized. Most artificial intelligence (AI) research in prostate disease diagnostics focuses on prostate cancer detection, while BPH–a highly prevalent but non-malignant condition–has received comparatively little attention. This disparity underscores a significant gap in the current medical AI landscape and highlights the need for further research into DL-based approaches for BPH diagnosis.

Researchers such as Litjens et al.6 developed a comprehensive automated system for prostate cancer detection using multi-parametric Magnetic Resonance Imaging (mpMRI). Their method leveraged deep convolutional neural networks (CNNs) to reconstruct intricate spatial patterns in mpMRI volumes, resulting in significant improvements in distinguishing malignant from benign tissue regions. Similarly, Bulten et al.7 proposed a deep learning (DL) model for Gleason grading on whole-slide histopathology images. Their AI system surpassed expert pathologists in both consistency and accuracy, setting a new benchmark for prostate cancer grading automation.

In contrast, AI-driven advancements for diagnosing Benign Prostatic Hyperplasia (BPH) remain relatively limited. Existing studies on BPH predominantly utilize traditional machine learning (ML) techniques with narrow application scopes. Other efforts in BPH classification have experimented with fuzzy logic systems, decision trees, and logistic regression models trained on small, private datasets. These datasets typically lack diversity in patient demographics and imaging variability, which reduces generalization. Furthermore, these conventional ML methods depend heavily on domain-specific feature engineering and require extensive preprocessing steps. As a result, such systems risk introducing bias and exhibit reduced effectiveness when exposed to unseen or real-world clinical data.

To date, there exists no complete deep learning pipeline that employs unprocessed RGB prostate tissue images for the automated diagnosis of BPH. This represents a significant gap in current research. Filling this gap could catalyze the creation of affordable, explainable, and non-invasive diagnostic solutions suitable for real-time use in rural clinics or telehealth platforms. Addressing this unmet need could transform prostate disease diagnosis by democratizing access to advanced screening technologies.

The work proposed in this study introduces a pioneering solution that addresses the above shortcomings. We present an interpretable, lightweight deep learning architecture specifically tailored for analyzing RGB prostate images to detect BPH. Our model integrates multiple key components including spatial feature extraction, temporal sequence modeling through bidirectional long short-term memory (BiLSTM) layers, and an attention mechanism for dynamic feature prioritization89. This architecture is further optimized using an adaptive focal loss function to address class imbalance–commonly observed in medical datasets.

By combining interpretability with clinical-grade precision, our system offers both transparency and performance. It lays a moderate foundation for subsequent research into benign urological disease classification and encourages wider exploration of AI applications in underrepresented medical domains.

Patch-based learning is commonly used in histopathological image analysis to process high-resolution slides by dividing them into smaller regions that preserve important diagnostic structures.

The medical imaging research field has extensively proven this approach as effective. Campanella et al.10, together with Hou et al.11 showed how utilizing patch-based learning improves performance measurements for both prostate and breast cancer diagnosis in histopathology work. The system’s training approach limited its model guidance to the parts of the images containing diagnostic value, which led to better performance and more accurate extrapolation to new data samples. The capability to augment data, together with expanded training datasets, supervision, and multiple-instance learning support, makes patch-based strategies particularly valuable when dealing with partial labels12.

Patch-based learning provides clinical interpretations and other distinct advantages, together with its performance scalability features. Benign Prostatic Hyperplasia (BPH) medical condition that displays localization features of enlarged gland tissue with thickened epithelium and expanded stroma. The tissue slide shows specific features that exist within various smaller subregions, although these features might not appear in their entirety throughout the entire slide. The model benefits from processing image patches since such an approach helps it concentrate on identifying essential diagnostic clues that might disappear in full-image data.

This work extends the quality-aware patch selection method through a developed algorithm for quality-based patch selection. The proposed filtering procedure selects patches from a tissue sample based on the removal of regions with background patterns and insufficient contrast and light exposure conditions. A diagnostic-content-rich area selection process operates with brightness, tissue-density and contrast measures as a heuristic. The preselection process guarantees meaningful histological features for training therefore it eliminates training noise while boosting both convergence and interpretability of the model.

The preprocessing technique that proves most successful for addressing these issues is Contrast Limited Adaptive Histogram Equalization (CLAHE). The CLAHE algorithm improves regional picture contrast levels, maintaining a sufficiently low signal-to-noise ratio compared to standard histogram equalization processing. When CLAHE operates in small image tiles, it enhances tissue features using adaptive contrast, which proves vital for medical diagnostic analysis. This methodology has demonstrated impressive achievements when used to analyze retinal images, along with analyzing skin lesions in dermoscopy and classifying liver tissues41314.

The histopathological RGB images in prostate are still not easy to analyse as sometimes the slight morphological variation between BPH and normal tissue can be hard to identify. The presence of difference in the intensity of staining, illumination, and the preparation of the slide may add another source of variability, which complicates the process of automated classification. These reasons encourage the application of contrast enhancement methods like CLAHE to enhance the local tissue visibility. The critical diagnostic elements, such as gland dilatation and epithelial thickening, together with stromal expansion, tend to have weak expression patterns that are irregularly spread throughout the section. Bright-field RGB imaging faces two major detection obstacles from lighting inconsistencies, in addition to unpredictable color patterns across the images. The generation of greater visibility for faint characteristics depends on the implementation of CLAHE technology.

The preprocessing framework of our study implements a dynamic CLAHE version. Each image patch receives unique tile size and clip-limit parameter adjustments, which depend on its individual brightness and intensity distribution. The system uses an optimal contrast enhancement method that protects against image over-saturation and detail destruction. Rao et al.14 presented research that utilized an altered CLAHE technique for both improving image contrast and enhancing boundary definition which resulted in superior performance during kidney segmentation with CNN. The research confirms the importance of adaptive preprocessing methods for medical imaging when they are used to enhance deep learning accuracy in organ-level analysis.

The preprocessing system of our workflow enables CLAHE alongside various approaches that optimize data quality. Human liver sclerosing particles will undergo brightness thresholding to erase overly bright or dark areas followed by tissue-content filtering for background elimination and Gaussian smoothing for noise removal and pixel intensity normalization for standardizing input data values.

The contributions of this study can be summarized into the following key points:

  1. Pioneering Approach: This study presents the first known application of deep learning for Benign Prostatic Hyperplasia (BPH) diagnosis using RGB histopathological prostate images obtained from H&E-stained slides. This approach retains the natural tissue morphology and color, making it more practical for real-world clinical deployments.

  2. Novel Hybrid Architecture: We propose a novel classification model that integrates Convolutional Neural Networks (CNNs) with Bidirectional Long Short-Term Memory (BiLSTM) layers and an attention mechanism. The model is further optimized using an adaptive focal loss function designed to mitigate class imbalance–an issue common in medical imaging datasets.

  3. Benchmark Dataset Evaluation: Our study establishes foundational benchmark results using a newly released dataset of RGB prostate images for BPH classification. These results will serve as a reference for future research in the domain of benign urological disease detection.

Results

The following section provides an extensive assessment of the CNN-BiLSTM-Attention model implementation for classifying BPH from histopathological image patches. The evaluation includes a thorough examination of training performance together with classification metrics and result visualization and deep analysis of performance indicators such as precision and recall and AUC-ROC and class-wise analytic.

Training and validation performance

The learning process utilized a total of 50 epochs with a batch size of 16, employing early stopping and learning rate reduction based on validation AUC scores. The peak validation AUC attained was 0.7220, while the final epoch reported a validation accuracy of 63.31%. To address class imbalance and emphasize harder-to-classify samples, a focal loss function with adaptive Inline graphic was employed.

During the training phase, particularly from Epoch 42 to Epoch 50, the model exhibited a consistent training accuracy of 68–69%, along with a corresponding AUC in the range of 0.79 to 0.81. As the validation AUC plateaued, the learning rate was automatically reduced to ensure stable convergence.

The model’s validation performance showed fluctuating precision and recall values across epochs. This behavior was attributed to the model’s inclination to misclassify samples belonging to the minority BPH class. Consequently, an increase in recall was often accompanied by a decrease in precision during validation.

Classification metrics

The proposed model achieved an overall classification accuracy of 65% on the held-out test set (1,845 samples), and the class-wise performance metrics (Table 1):

Table 1.

Classification Report on the Test Set.

Class Precision Recall F1-Score Support
Normal (0) 0.59 0.97 0.73 923
BPH (1) 0.92 0.32 0.48 922

The data reveals an extensive preference for detecting normal tissue because the model attains excellent precision yet struggles with BPH class detection. The model faces difficulties identifying the separation between benign and normal tissues due to subtle structural and morphological similarities under specific staining conditions.

The F1-score reached 0.60 based on macro-average calculations; however, the weighted average became 0.61 because the classes show sensitivity differences. The model demonstrates a conservative behavior in detecting positive BPH cases since it efficiently remembers normal tissues while showing low recall for BPH samples.

Although the proposed model achieved a moderate precision for the BPH class (0.92), the corresponding recall remained relatively low (0.32). This indicates that while the classifier is highly selective when predicting BPH and produces few false-positive predictions, it fails to identify a substantial proportion of true BPH cases. This behavior suggests that the model adopts a conservative decision boundary for positive predictions.

ROC curve and AUC

The evaluation of the receiver operating characteristic (ROC) curve revealed an area under the curve (AUC) value of 0.73 in the test results (refer to Fig. 4). The model demonstrates moderate ability to distinguish between the two classes. The AUC rating indicates that the model developed a suitable classification-capable feature space, although not at its best.

Fig. 4.

Fig. 4

Receiver Operating Characteristic (ROC) curve showing the model’s performance on the test set. The AUC value of 0.73 indicates moderate discriminatory capability, with high sensitivity to the Normal class but reduced confidence in BPH detection.

The orange curve in the ROC plot suggests that the model correctly identifies most normal samples, although it shows poor performance when identifying BPH cases confidently. Observations show that the BPH class experiences many false-negative cases, which matches results from this earlier finding.

Model interpretability through attention visualization

To improve interpretability and transparency of the proposed CNN–BiLSTM–Attention framework, we generated representative attention visualizations highlighting the regions that contributed most strongly to the model’s predictions.

Figure 2 presents Grad-CAM based activation maps overlaid on representative histopathological patches. These visualizations indicate that the model primarily focuses on morphologically meaningful structures such as glandular crowding, epithelial thickening, and stromal expansion, which are commonly associated with benign prostatic hyperplasia (BPH).

Fig. 2.

Fig. 2

Grad-CAM attention heatmap visualization for representative prostate histopathology patches. The left column shows original tissue images, while the right columns display the corresponding attention heatmaps generated by the model. Red regions indicate areas that contribute most strongly to the model’s prediction. The top rows correspond to BPH samples, whereas the bottom rows represent normal prostate tissue.

The attention patterns demonstrate that the network does not rely on background regions or staining artifacts but instead concentrates on diagnostically relevant tissue areas. These qualitative observations support the design of the attention-guided architecture and provide additional evidence that the model learns meaningful morphological features rather than arbitrary image patterns.

Comparison with baseline CNN models

To contextualize the performance of the proposed architecture, we conducted comparative experiments with several standard convolutional neural network (CNN) baselines. Specifically, VGG16, ResNet50, and EfficientNetB0 were trained using the same preprocessing pipeline, patch extraction procedure, and dataset split configuration.

Table 2 summarizes the classification performance of these baseline models compared with the proposed CNN–BiLSTM–Attention framework.

Table 2.

Performance comparison with baseline CNN models.

Model Accuracy Precision Recall F1-score AUC
CNN (Baseline) 0.60 0.78 0.28 0.41 0.69
ResNet50 0.62 0.84 0.30 0.44 0.71
EfficientNetB0 0.63 0.88 0.31 0.46 0.72
Proposed CNN–BiLSTM–Attention 0.65 0.92 0.32 0.48 0.73

The results indicate that the proposed architecture achieves modest improvements in classification metrics, particularly in terms of AUC and precision for BPH detection. While the gains are not dramatic across all metrics, the integration of sequential modeling through BiLSTM and attention-based feature weighting enables the model to capture contextual relationships between tissue patches that conventional CNN models may overlook.

These findings suggest that combining spatial feature extraction with temporal sequence modeling can provide complementary diagnostic information beyond standard convolution-only architectures (Fig. 3).

Fig. 3.

Fig. 3

Performance comparison between baseline CNN models and the proposed CNN–BiLSTM–Attention architecture. The proposed model shows modest improvement in AUC and precision while maintaining competitive recall and F1-score.

Additional examination of misdiagnosed patches aimed to discover their root causes. The analysis confirmed that BPH patches were misclassified as Normal when their glandular density was low or when epithelial structures appeared equivocal. Several errors were also attributed to inconsistent blood stain quality and image blur at the patch level. These findings indicate that incorporating stain normalization techniques and stain-invariant training strategies should be prioritized in future model improvements to enhance robustness across varying staining conditions.

Discussion

The findings of the research point to the fact that the suggested CNN–BiLSTM–Attention-based model has potential in terms of the classification of BPH by analyzing RGB histopathological images. The model is a hybrid architecture that combines several deep learning elements that examine spatial texture patterns using convolutional layers and contextual dependencies using a Bidirectional LSTM. Also, the attention mechanism forms dynamically weight-based temporal features improvements with the most discriminative, allowing the network to concentrate on the diagnostically important areas. The combination of convolutional feature extraction, sequential modeling and attention-guided learning also helps to enhance the interpretability and provide a more targeted analysis when performing histopathology.

The proposed CNN–BiLSTM–Attention model achieved a test ROC-AUC of 0.73, indicating moderate discriminatory capability between normal and BPH tissue patches. While these findings demonstrate the feasibility of deep learning-based analysis of RGB prostate images, the results should be interpreted as preliminary rather than clinically definitive, and further validation on larger and more diverse datasets will be necessary before potential clinical deployment.

The model achieved a test AUC of 0.73 and high precision for the BPH class (0.92); however, the corresponding recall remained low (0.32). A large number of true BPH instances remain unidentified because the model exhibits a distinctive behavior of recognizing positive samples when it classifies, while misdiagnosing many existing BPH cases. Moderate precision enables minimal false positive diagnoses, yet the low level of recall creates issues since it might delay proper treatment for patients. The model demonstrated this behavior partly due to both restricted sample quantity and natural class distribution imbalance between BPH and normal samples, where we implemented class weighting along with data enhancement strategies. Further development of the model is necessary to enhance its sensitivity, although this work needs to maintain current levels of precision. The comparatively low recall for the BPH class indicates that the model is unable to identify some proportion of true BPH cases. Although the proposed framework demonstrates feasibility for automated BPH classification, the current sensitivity is insufficient for clinical screening or autonomous diagnosis. The present model should therefore be considered exploratory and supportive in nature, with future work focused primarily on reducing false negatives. At its current stage, the proposed model should be regarded as a decision-support tool rather than an autonomous diagnostic system. It may assist pathologists by identifying tissue regions warranting closer review; however, the present recall is insufficient for standalone screening applications. Clinical deployment would require higher sensitivity, multicenter validation, and calibration under routine pathology workflows. Although the accuracy is moderate and presupposes that the predicted cases of BPH are typically accurate, the low sensitivity limits the applicability of the model in the screening-based clinical practices, in which the number of positive cases detected is crucial. The work in the future will then be based on enhancing sensitivity by using larger and more diverse datasets, optimization of thresholds, and multi-scale learning of features.

The model training process together with the performance results confirmed the effectiveness of the preprocessing pipeline. The local tissue morphology became more distinguishable when CLAHE (Contrast Limited Adaptive Histogram Equalization) was applied to the L-channel of LAB color space. The RGB format of the dataset benefited from this preprocessing method since it normally lacks H&E stain standardization. During training the extraction of quality-controlled informative patches by a multi-criteria filter based on standard deviation and contrast and mean intensity and tissue content enriched model learning.

Using BiLSTM for sequential modeling enabled the network to detect extended visual dependencies throughout extracted patch sequences because it replicated pathologist diagnostic processes when observing continuous tissue structures. The temporal attention mechanism improves this ability by focusing on feature vectors from the most pertinent patches in ways that correspond to clinical observations of hyperplasia occurring only at particular locations.

Nevertheless, some limitations persist. Despite the use of patch-based learning and augmentation, the dataset remains limited in size and source diversity. Because all images originate from a single dataset and a relatively small cohort, the learned feature distribution may not generalize well to other institutions, scanners, or preparation conditions. Accordingly, the current findings should be interpreted as preliminary and hypothesis-generating. The research adopts images from a clinical facility but these 176 images create restrictions for model exposure to different visual data patterns. None of the applied patch-based augmentation techniques can replace a large and balanced dataset for complete dataset augmentation. The implementation of RGB images without standardized staining techniques results in inconsistent color patterns throughout the data thereby reducing effectiveness of generalized learning. The present pipeline fails to specifically represent glandular morphology together with nuclear patterns because these elements are essential for detecting BPH during pathology assessment. Future research should focus on developing explicit morphological prior models plus transformer-based global context modules as they show promise for next-level development15.

This study introduces a novel and resilient deep learning methodology aimed at the identification of Benign Prostatic Hyperplasia (BPH) using RGB histopathological prostate images. The complete workflow is meticulously designed to address core challenges in medical image analysis, including visual inconsistency of BPH regions, class imbalance, and intra-image color variations that often compromise model performance.

The pipeline begins with a rigorous patch extraction strategy focused on preserving morphological details and tissue quality. A sliding window with 50% overlap is applied, guided by statistical thresholds on standard deviation, mean intensity, contrast, and tissue percentage. These criteria ensure the selection of structurally informative patches. To enhance visibility of textural features while preserving color fidelity, each selected patch undergoes Contrast Limited Adaptive Histogram Equalization (CLAHE) applied on the luminance channel of the image in LAB color space.

The core classifier is a hybrid neural architecture that integrates Convolutional Neural Networks (CNNs), Bidirectional Long Short-Term Memory (BiLSTM) units, and dual attention mechanisms. The CNN backbone is responsible for extracting rich hierarchical spatial features. This is followed by a spatial attention module, which highlights the most informative regions in the feature maps. The refined features are then reshaped into temporal sequences and passed through a BiLSTM block to capture bidirectional contextual dependencies.

A temporal attention mechanism is employed to dynamically assign weights to time steps based on their relevance, allowing the model to focus on critical sequence patterns. Finally, the attended representation is passed through fully connected layers to yield a binary classification output indicating the presence or absence of BPH. The implementation of adaptive focal loss played a crucial role in addressing the class imbalance inherent in the dataset. By dynamically adjusting class weights during each training batch, the loss function placed increased emphasis on hard-to-classify and minority samples. This was further supported by the use of diverse image augmentation techniques, including rotation, shearing, and color perturbations, which collectively enhanced the model’s generalization ability while mitigating overfitting.

Empirical results substantiated the effectiveness of the proposed classification framework. The model achieved a validation AUC score of 0.7220 and a test AUC of 0.73, indicating moderate discriminative performance. During training, the model attained a training accuracy of 69% and a validation accuracy of 63.31%, suggesting a stable and moderately generalized learning capability.

In terms of precision and recall trade-offs, the model exhibited high precision scores for BPH prediction, whereas recall values were comparatively lower. This trend reflects a conservative classification behavior that favors reducing false positives over maximizing sensitivity–a valuable trait in high-stakes medical diagnosis. While the conservative approach may overlook some true positives (i.e., false negatives), it ensures fewer incorrect BPH diagnoses, thereby reducing unnecessary psychological and clinical follow-up consequences. Such trade-offs align with accepted practices in clinical screening systems, where minimizing false alarms often takes precedence over exhaustive detection. The collected data highlights both the advantages and limitations of utilizing RGB-based histopathological images for medical diagnostics. RGB imaging offers notable ease of acquisition and compatibility with standard image processing pipelines, especially when compared to hyperspectral or multimodal scanning systems. However, its restricted spectral range and sensitivity to staining inconsistencies pose significant challenges for reliable feature extraction and model generalization.

The proposed framework establishes a foundational approach for future investigations, including the integration of multimodal data sources such as histopathology with genomic or radiological information. Additionally, the framework presents opportunities for extending to semi-supervised learning scenarios using partially labeled datasets, and to federated learning settings that uphold privacy across multiple clinical data centers.

This study presents a preliminary deep learning framework for BPH detection using RGB histopathological images. Although the proposed architecture proves to be an analytical structure on an automated basis, the present sensitivity is not yet strong enough to conduct a clinical screening, and additional research on the subject is needed to enhance the detection of BPH-positive cases. It successfully integrates clinical requirements with computational rigor by leveraging structured data preprocessing, attention-enhanced model design, statistically robust evaluation, and domain-informed engineering practices. Future enhancements will aim to expand the current binary classification system into a multi-class framework capable of performing Gleason grading, as well as develop stain-invariant representations to improve generalizability across laboratories. The ultimate objective is to enable real-time integration into clinical decision-support systems for high-impact, practical deployment.

Methods

Dataset description

This research uses the “Benign Prostatic Hyperplasia (BPH) Diagnostic Imaging Dataset,” which Kaggle provides freely to the public. The dataset features 176 RGB images from prostate gland histopathological examinations, with BPH and Normal tissue being the two disease categories. The clinical diagnostic center in Bangladesh contributed these images, which provide an authentic dataset that replicates medical image practices and population demographics in the region.

The dataset used in this study consists of two equally distributed classes labeled as BPH (Positive Class) and Normal (Negative Class).

The BPH (Benign Prostatic Hyperplasia) class is defined as the positive class due to the presence of benign glandular enlargement, which may include both stromal and epithelial hyperplasia. In contrast, the Normal (Negative Class) refers to healthy prostate tissue without any observable hyperplastic changes.

All images in the dataset are in RGB (Red, Green, Blue) color format, stored as .jpg files with medium to high resolution as shown in Fig. 5. Unlike grayscale representations, RGB images preserve essential tissue-level characteristics, including color saturation, hue variations, and ductal staining patterns. These features play a critical role in identifying subtle morphological differences between healthy and hyperplastic tissue, which would otherwise be diminished or lost during grayscale conversion. The dataset contains a total of 176 prostate images in RGB (Red, Green, Blue) format, comprising 94 images labeled as benign prostatic hyperplasia (BPH) and 82 images representing healthy prostate tissue. The original sample is thus close to being balanced on the image level though not exactly equal. Several patches are created of every image after patch extraction to train the model. In this step, class balancing is applied at the patch level using sampling and training-time class weighting to guarantee contributions of both classes are equal in the optimization process. This equal representation across classes eliminates issues related to class imbalance, thereby reducing the risk of training bias and early learning distortions during model development (Table 3).

Fig. 5.

Fig. 5

Original images from the dataset: the first five samples represent BPH (Benign Prostatic Hyperplasia), and the next five samples represent Normal prostate tissue.

Table 3.

Dataset Statistics After Patch Extraction and Augmentation.

Dataset stage Number of samples Description
Original images 176 RGB histopathological prostate images
Extracted patches (Quality Filtered) 2460 Patches retained after quality filtering
Augmented patches 7380 Each patch augmented 3 times
Training set (70%) 5166 Used for model learning
Validation set (15%) 1107 Used for hyperparameter tuning
Test set (15%) 1845 Held-out evaluation set

The original dataset consisted of 176 RGB histopathological images. After patch extraction and quality filtering, a total of 2460 valid patches were retained. Each patch was augmented three times using geometric and color transformations, resulting in a final dataset of 7380 patch samples. The dataset was then divided into training, validation, and testing subsets using a 70:15:15 ratio. The resulting split contained 5166 training samples, 1107 validation samples, and 1845 testing samples.

Although the balanced distribution is beneficial, the overall limited dataset size introduces challenges in achieving effective generalization. To address this, extensive data augmentation techniques are applied during training. These include geometric transformations, color jittering, brightness and contrast adjustments, and other synthetic variations to increase sample diversity. Deep learning model robustness depends on data augmentation because it helps prevent overfitting when applied to small medical datasets.

The balanced distribution of images across the two classes helps minimize initial model bias during training. However, the relatively small dataset size poses challenges for deep learning model generalization. To address this, we incorporate robust data augmentation strategies in our pipeline, including geometric transformations, brightness and contrast adjustments, and color jittering, to synthetically expand the dataset and reduce overfitting.

The dataset was compiled through patient biopsy examinations conducted under clinical supervision. Pathologists captured RGB (Red, Green, Blue) images from histopathological slides that underwent conventional H&E (Hematoxylin and Eosin) staining. This staining technique vividly highlights cellular nuclei and cytoplasmic structures, providing rich visual detail. The resulting image data clearly illustrates tissue alterations associated with Benign Prostatic Hyperplasia (BPH), including the crowding of acinar glands, stromal enlargement, and irregular glandular pattern formations. In contrast, the normal class images contain uniformly spaced glands with minimal stromal cell proliferation, representing healthy prostate tissue architecture.

Because the dataset incorporates both morphological and chromatic features, it is well-suited for deep learning-based classification. The models are capable of learning glandular hyperplasia patterns, variations in epithelial cell density, and changes in staining intensity–all of which are indicative of BPH. The use of RGB imaging, rather than grayscale or binary alternatives, allows the network to leverage subtle color differences and spatial textures that are essential for accurate diagnostic classification.

Ethical considerations

The data in this study is anonymized histopathological images that are taken out of a publicly available data repository in Kaggle. No personally identifiable patient information is contained in the dataset. In this study, the secondary analysis of the previously gathered medical images was the only type of research that did not require any form of direct contact with human subjects or access to confidential patient information. Hence, no further ethical consent was needed to have the current study.

Data preprocessing

This section details the entire methodological approach that performs binary BPH classification from RGB prostate histopathological images. The system combines high-quality preprocessing methods with deep learning architecture that uses CNN and BiLSTM and Attention components. A complete methodology consists of two principal components, namely Data Preprocessing and Model Architecture, which encompasses configuration details and training parameters along with evaluation metrics.

Patch extraction with quality filtering

The utilization of high-resolution RGB histopathological images for deep learning requires a division process for each input image

graphic file with name d33e857.gif

into a set of smaller, overlapping patches

graphic file with name d33e861.gif

denotes the patch size. The extraction is performed using a stride Inline graphic, which ensures that neighboring patches overlap by 50%, thus retaining sufficient contextual information and minimizing the loss of relevant structural details.

A multi-criteria quality filter retains only informative patches because they do not contribute equally for the classification process. The filtering process protects the model from acquiring knowledge from unhelpful areas consisting of empty backgrounds and tissue borders as well as staining artifacts that appear frequently in clinical slide images.

A patch Inline graphic is retained if it satisfies the following quality score condition:

graphic file with name d33e877.gif

where each metric plays a specific role:

  • Inline graphic: Standard deviation of grayscale pixel intensities, measuring local texture variation. Low Standard deviation reveals flat and uniform regions of an image. The standard deviation stands for local texture variation, but background regions display low values.

  • Inline graphic: Mean intensity of the patch, ensuring that the patch is not underexposed (too dark) or poorly stained.

  • Inline graphic: Tissue content ratio, calculated as:
    graphic file with name d33e900.gif
    Here, Inline graphic is the indicator function. This measurement leverages a brightness threshold of 220 to count the tissue-intensified pixels, which represent the percentage of non-background areas.
  • Inline graphic: Contrast, defined as the difference between maximum and minimum grayscale intensities in the patch:
    graphic file with name d33e914.gif
    Higher contrast values are typically associated with well-defined tissue boundaries and staining features. To ensure meaningful training data, empirically determined thresholds are applied:
    • Inline graphic (texture richness),
    • Inline graphic (minimum brightness),
    • Inline graphic (minimum contrast).
    The preprocessing system preserves only sections which fulfill every established criterion to proceed with enhancement processing and normalization followed by model training. Through this filtering mechanism model performance greatly improves since it eliminates noise and irrelevant structures and background-only areas which ensures training concentrates on meaningful biological material as shown in Fig. 6.
Fig. 6.

Fig. 6

Representative high-quality patches extracted from prostate histopathology images. The top row displays patches labeled as Benign Prostatic Hyperplasia (BPH), while the bottom row shows patches from Normal tissue samples. All patches were selected using a quality-based filtering strategy incorporating tissue percentage, contrast, standard deviation, and mean intensity.

CLAHE-based contrast enhancement

Important tissue patterns like glandular structure and epithelial textures from RGB slides become difficult to recognize due to contrast variations between uneven staining and scanner inconsistencies, and lighting artifacts. We apply Contrast Limited Adaptive Histogram Equalization (CLAHE) before the deep learning model input as a preprocessing approach to highlight delicate tissue patterns.

Traditional global histogram equalization methods differ from CLAHE because it adjust contrast locally through their tile-based approach to histogram equalization. By applying this method, the approach prevents noise amplification while maintaining vital structural details that are needed for accurate classification of BPH.

Implementation steps

Selective application of CLAHE-based contrast enhancement occurs on the L channel within the LAB color space to enhance brightness (lightness) characteristics independently from color information. Through this method, the image’s chromatic attributes remain intact while it amplifies contrast resolution specifically in the luminance channel.

The procedure can be described as follows:

  1. Color Space Conversion Convert the original RGB image Inline graphic into LAB space:
    graphic file with name d33e978.gif
    here L represents the lightness channel, while A and B capture the color-opponent dimensions.
  2. Apply CLAHE on the L Channel CLAHE is applied to the L channel with parameters tuned dynamically based on the average brightness of the patch:
    graphic file with name d33e1007.gif
    • clipLimit controls the amount of contrast adjustment in the image processing workflow. With lower values the enhancement of noise in bright areas will be minimized.
    • tileGridSize in image subdivision occurs according to the it’s parameter. The subdivision size of grids affects the degree localized contrast enhancement will occur.
    The parameters are not static:
    • For darker patches (mean Inline graphic), a higher clipLimit (e.g., 3.0) is used to better reveal dark glandular structures.
    • For brighter patches, a slightly reduced clipLimit (e.g., 2.0) is applied to avoid over-enhancement and preserve texture balance.
  3. Reconstruction of Enhanced RGB Image After enhancing the L channel, the modified image is reconstructed by merging it with the original A and B channels and converting it back to RGB:
    graphic file with name d33e1056.gif
    The enhanced image Inline graphic, emerges through this process. The final image contains the original tissue color while creating better visual clarity of local details. visibility of local details.

Data augmentation

Deep learning models need extensive quantities of varied training data for successful generalization capability. The datasets consisting of medical images together with histopathological analysis typically possess limited quantity and show an imbalance between different sample categories. A lopsided class distribution pattern during model training makes the system prone to develop biased algorithms that fail to properly identify minority categories (BPH or Normal).

A data augmentation method acts as our solution to develop synthetic training samples and expand training dataset diversity. Specifically, each valid patch Inline graphic is augmented Inline graphic times using a set of random transformations, generating new examples which maintain their original labels through modifications in spatial arrangements and geometric forms as well as colors. Formally, let Inline graphic denote a transformation function applied to patch P, then the augmented patches are generated as:

graphic file with name d33e1085.gif

Where Inline graphic, and the transformation set Inline graphic is defined as:

graphic file with name d33e1098.gif

The classification method uses separate augmentation for each class to maintain proper class distribution before and after augmentation. Through this method the model achieves better robustness along with generalization ability and reduced likelihood of overfitting which remains crucial for BPH detection due to limited data availability.

The augmented dataset features expanded appearance diversity between original and augmented patches which maintains correct semantic class identifications.

Dataset balancing and splitting

Once the patch has been extracted, the patch-level dataset is equalized so that classes can receive equal chances to learn. This is done by undersampling the majority sample until the BPH and the Normal sample are the same.

graphic file with name d33e1108.gif

By implementing this method, the model avoids developing a preference for the dominant class during training. The complete dataset is subsequently split into training, validation, and testing sets with ratios of 70% : 15% : 15%. During the training phase, class weights are incorporated to further address any residual imbalance and to emphasize minority class samples:

graphic file with name d33e1112.gif

where Inline graphic is the weight for class c, N is the total number of samples, Inline graphic is the total number of classes, and Inline graphic is the number of samples in class c.

  • Equal samples from both BPH and Normal classes via undersampling:
    graphic file with name d33e1142.gif
  • Dataset split:
    graphic file with name d33e1148.gif
  • The training applies class weights to balance samples while prioritizing minority classes during the learning process. The calculation formula establishes weights for this purpose. Class weights used during training are computed as:
    graphic file with name d33e1154.gif
    Where Inline graphic is the weight for class c, N is total samples, and Inline graphic is the number of samples in class c.

Model architecture

The complete workflow of the CNN–BiLSTM–Attention model appears in Fig. 7. The model sequence consists of convolutional blocks that integrate batch normalization and ReLU activation mechanisms, followed by alternating max pooling operations. A spatial attention module is applied to emphasize important regions within the feature map. The spatially weighted features are then reshaped into sequential representations, which are passed to a Bidirectional LSTM layer to capture both forward and backward temporal dependencies. Temporal attention subsequently generates contextually weighted summaries, which are processed by fully connected layers to classify the input patch as either BPH or Normal based on the final sigmoid output.

Fig. 7.

Fig. 7

Proposed CNN–BiLSTM–Attention architecture for patch-level BPH classification.

Architectural configuration

All experiments in this study were conducted using Kaggle’s cloud-based GPU infrastructure. The implementation was carried out using Python version 3.10 with TensorFlow 2.12.0 as the primary deep learning framework, alongside the high-level Keras API for model construction and training.

Data preprocessing and manipulation were facilitated using standard Python libraries including NumPy, OpenCV, Pillow (PIL), and Matplotlib. Training was executed on a single NVIDIA Tesla T4 GPU with 16 GB VRAM, provided via Kaggle’s notebook environment. Although the platform does not explicitly disclose CPU or memory specifications, TensorFlow GPU acceleration utilized cuDNN and CUDA 11.x drivers from Kaggle’s backend.

Real-time data augmentation and batch-level loading/shuffling were managed using tf.data pipelines, while ImageDataGenerator was used for on-the-fly preprocessing to enhance computational efficiency. TensorFlow’s automatic memory management system was employed for GPU resource optimization, and hardware utilization was monitored via notebook-level tools.

Model training progress and evaluation metrics such as accuracy, loss, and AUC were tracked and visualized using Matplotlib, while model checkpoints were saved to Kaggle’s working directory to ensure recoverability in case of interruptions.

BPH classification pipeline

Table 4 presents a complete deep learning approach to classify Benign Prostatic Hyperplasia (BPH) within RGB histopathological prostate images. High-quality patch extraction initiates the workflow, which is followed by preprocessing and augmentation steps, and then proceeds to sequence modeling through a CNN-BiLSTM-Attention classification network.

Table 4.

Layer-wise Model Parameters of the Proposed CNN–BiLSTM–Attention Architecture.

Layer Type Parameters Output Shape
 Input and CNN feature extractor
 Input Input Layer – (224, 224, 3)
 Conv1 Conv2D 32 filters, Inline graphic, stride 2 (112, 112, 32)
 BN1 BatchNormalization – (112, 112, 32)
 ReLU1 Activation ReLU (112, 112, 32)
 MaxPool1 MaxPooling2D pool size Inline graphic (56, 56, 32)
 Conv2 Conv2D 64 filters, Inline graphic, stride 1 (56, 56, 64)
 BN2 BatchNormalization – (56, 56, 64)
 ReLU2 Activation ReLU (56, 56, 64)
 MaxPool2 MaxPooling2D pool size Inline graphic (28, 28, 64)
 Conv3 Conv2D 128 filters, Inline graphic, stride 1 (28, 28, 128)
 BN3 BatchNormalization – (28, 28, 128)
 ReLU3 Activation ReLU (28, 28, 128)
 Conv4 Conv2D 256 filters, Inline graphic, stride 1 (28, 28, 256)
 BN4 BatchNormalization – (28, 28, 256)
 ReLU4 Activation ReLU (28, 28, 256)
Spatial attention block
 AvgProj Conv2D 1 filter, Inline graphic (28, 28, 1)
 MaxProj Conv2D 1 filter, Inline graphic (28, 28, 1)
 Concat Concatenate Concatenate pooled maps (28, 28, 2)
 AttnMap Conv2D 1 filter, Inline graphic, sigmoid activation (28, 28, 1)
 Feature weighted Multiply Input features Inline graphic attention map (28, 28, 256)
BiLSTM sequence modeling with attention
 ConvReduce Conv2D 128 filters, Inline graphic (28, 28, 128)
 BN5 BatchNormalization – (28, 28, 128)
 ReLU5 Activation ReLU (28, 28, 128)
 Reshape Reshape Reshape to sequence format (T, D) (784, 128)
 BiLSTM Bidirectional LSTM 64 units per direction (784, 128)
 Dropout Dropout Dropout rate = 0.3 (784, 128)
 AttnScore TimeDistributed Dense 1 unit, tanh activation (784, 1)
 Flatten Flatten – (784,)
 Softmax Activation Softmax across time dimension (784,)
 RepeatVec RepeatVector Repeat attention weights 128 times (128, 784)
 Permute Permute Transpose to (T, D) alignment (784, 128)
 Multiply Multiply Weighted sum of LSTM output (784, 128)
 TD-Dense TimeDistributed Dense 1 unit (784, 1)
 Flatten Flatten – (784,)
Fully connected classification layers
 Dense1 Dense 256 units, ReLU activation (256)
 BN6 BatchNormalization – (256)
 Dropout1 Dropout Dropout rate = 0.4 (256)
 Dense2 Dense 128 units, ReLU activation (128)
 BN7 BatchNormalization – (128)
 Dropout2 Dropout Dropout rate = 0.3 (128)
 Output Dense 1 unit, sigmoid activation (1)

Each image is divided into fixed Inline graphic pixel-sized overlapping patches with a stride of 112 pixels. The analysis of each patch requires the calculation of four quality measures: standard deviation, mean intensity, tissue percentage, and contrast. Only patches that meet all specified quality thresholds are retained. The enhancement process for valid patches is conducted in the LAB color space by applying adaptive Contrast Limited Adaptive Histogram Equalization (CLAHE) on the Inline graphic-channel. The adjusted input patches are normalized to a stable range of [0, 1] for model processing. The selected dataset contains Inline graphic top-quality patches from each image. The original dataset undergoes multiple image augmentation techniques such as rotation, flipping, zooming, shearing, brightness adjustment, and color shifting to expand its size. The merged combination of original and augmented patches forms the final dataset, which is then split into training, validation, and testing sets in proportions of 70:15:15. During training, class weights are utilized to address imbalances in class proportions. The core structure of the proposed model consists of multiple layers of Conv2D Inline graphic BatchNormalization Inline graphic ReLU Inline graphic MaxPooling blocks, which perform spatial feature extraction. Following this, a spatial attention mechanism is applied, which combines average and max pooled projections using a convolutional attention gate to generate an attention map. This map is then applied to the CNN features.

The spatially weighted feature maps are reshaped and passed into a Bidirectional LSTM (BiLSTM) unit, enabling the network to capture both forward and backward contextual dependencies. Subsequently, a temporal attention mechanism computes attention scores across time steps, allowing a context vector to be generated through a weighted summation.

In the final stage, fully connected layers with dropout and batch normalization are used to maintain generalization capabilities. A sigmoid activation function is applied to produce the probability of BPH presence. The model predicts BPH when the probability exceeds 0.5, and Normal otherwise.

Proposed work

The feature extractor consists of four convolutional blocks. Each block performs a sequence of operations: 2D convolution, batch normalization, ReLU activation, and max pooling. The transformation for layer Inline graphic is defined as:

graphic file with name d33e1771.gif

The convolutional filters are configured as follows:

  • Layer 1: 32 filters, stride 2

  • Layer 2: 64 filters, stride 1

  • Layer 3: 128 filters, stride 1

  • Layer 4: 256 filters, stride 1

Each convolution uses a kernel size of Inline graphic. After this stage, the final feature map is denoted as Inline graphic, where Inline graphic, Inline graphic, and Inline graphic are the reduced height, width, and number of channels, respectively.

Spatial attention mechanism

To emphasize salient spatial regions, a spatial attention map is computed by applying average pooling and max pooling operations across the channel axis:

graphic file with name d33e1814.gif

These pooled maps are concatenated and passed through a convolution layer with a sigmoid activation to generate the spatial attention mask:

graphic file with name d33e1818.gif

The original feature map is then reweighted using element-wise multiplication:

graphic file with name d33e1822.gif

Reshaping for BiLSTM

The attention-refined features Inline graphic are reshaped into a 2D matrix suitable for sequence modeling:

graphic file with name d33e1833.gif

Each timestep corresponds to a spatial location, and d is the feature dimension per timestep.

Bidirectional LSTM

The reshaped sequence is processed by a Bidirectional LSTM to capture contextual dependencies from both temporal directions:

graphic file with name d33e1844.gif

Here, Inline graphic denotes the concatenated forward and backward hidden states for timestep t.

Temporal attention mechanism

To aggregate important temporal features, we employ an attention mechanism. Each Inline graphic is first passed through a dense layer with Inline graphic activation:

graphic file with name d33e1867.gif

The attention scores are then computed using a softmax normalization:

graphic file with name d33e1871.gif

The context vector is a weighted sum of the BiLSTM outputs:

graphic file with name d33e1875.gif

Fully connected layers

The context vector c is then passed through two fully connected (dense) layers, each followed by ReLU activation and dropout regularization. Finally, a sigmoid activation provides the probability of the positive class (BPH):

graphic file with name d33e1885.gif

where Inline graphic represents the predicted probability for the BPH class as shown in Table 4.

The algorithm 1 shows that the complete pipeline enables the model to focus on high-quality relevant features, thus enhancing its effectiveness in BPH classification tasks.

Algorithm 1.

Algorithm 1

Proposed Deep Learning Pipeline for BPH Classification

Evaluation metrics

The performance evaluation of the proposed CNN–BiLSTM–Attention model for BPH classification included standard and advanced evaluation metrics to enable a comprehensive assessment. In biomedical imaging, precision and recall are essential metrics, particularly when categorizing binary entities such as normal and BPH tissues.

The performance evaluation of the proposed model is conducted using standard classification metrics, described below:

  1. Accuracy Accuracy measures the overall correctness of the model by calculating the ratio of correctly predicted samples to the total number of predictions.
    graphic file with name d33e1925.gif 1
    Where:
    • TP: True Positives (correctly predicted BPH patches)
    • TN: True Negatives (correctly predicted Normal patches)
    • FP: False Positives (Normal patches incorrectly predicted as BPH)
    • FN: False Negatives (BPH patches incorrectly predicted as Normal)
    While accuracy is a good general measure, it may be misleading in imbalanced datasets.
  2. Precision Precision evaluates the proportion of positively predicted samples that are actually positive.
    graphic file with name d33e1959.gif 2
    Moderate precision means fewer false positives, which is crucial in medical diagnostics to reduce overdiagnosis.
  3. Recall (Sensitivity) Recall measures the model’s ability to correctly identify all actual positives.
    graphic file with name d33e1971.gif 3
    High recall is vital in clinical scenarios to avoid missing BPH cases.
  4. F1-Score F1-Score is the harmonic mean of precision and recall and is especially useful when dealing with imbalanced datasets.
    graphic file with name d33e1983.gif 4
  5. AUC–ROC (Area Under the ROC Curve) The ROC curve plots True Positive Rate (Recall) against False Positive Rate (FPR) across different thresholds. AUC quantifies the overall ability of the model to distinguish between classes.
    graphic file with name d33e1994.gif 5
    graphic file with name d33e1998.gif 6
    AUC = 1.0 represents perfect separation; AUC = 0.5 implies random guessing.
  6. Binary Cross-Entropy (BCE) Loss Used during training to measure the difference between predicted probabilities and true binary labels.
    graphic file with name d33e2010.gif 7
    Where Inline graphic is the predicted probability and Inline graphic is the ground truth.
  7. Adaptive Focal Loss Focal Loss is adapted to address class imbalance by focusing more on hard-to-classify examples.
    graphic file with name d33e2030.gif 8
    Where:
    • Inline graphic is the predicted probability for the true class
    • Inline graphic is dynamically adjusted per batch
    • Inline graphic is the focusing parameter
    Adaptive scaling helps ensure balanced learning across both classes.

Author contributions

Conceptualization: R.S. and S.S. ; Methodology: H.K.S, S.S ; validation: R.K. and H.K.S; Formal analysis: H.K.S., S.S and R.S.; investigation: H.K.S., S.S and R.K.; resources: R.S. and S.S; data curation: R.S and R.K; writing original draft preparation: R.S., S.S. and H.K.S; writing review and editing: H.K.S AND R.K; visualization: R.S and R.K; supervision: H.K.S and R.S; project administration: R.S and R.K.;

Funding

Open access funding provided by Manipal University Jaipur.

Data availability

The datasets used and/or analysed during the current study are available from the corresponding author on reasonable request.

Declarations

Competing of interest

The authors declare no competing interests.

Consent to participate

All authors have mutually consented to participate.

Consent for publication

All the authors have consented to the Journal to publish this paper.

Footnotes

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  • 1.Hameed, S., Malik, A., Bilal, S., Dogar, S. R. & Aslam, S. Pattern of prostatic disease: A histopathological survey. Prof. Med. J.17, 573–577 (2010). [Google Scholar]
  • 2.Shorten, C. & Khoshgoftaar, T. M. A survey on image data augmentation for deep learning. J. Big Data6, 1–48 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Esteva, A. et al. Dermatologist-level classification of skin cancer with deep neural networks. Nature542, 115–118 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Gulshan, V. et al. Development and validation of a deep learning algorithm for detection of diabetic retinopathy in retinal fundus photographs. JAMA316, 2402–2410 (2016). [DOI] [PubMed] [Google Scholar]
  • 5.Rajpurkar, P. et al. Chexnet: Radiologist-level pneumonia detection on chest x-rays with deep learning. arXiv preprint arXiv:1711.05225 (2017).
  • 6.Litjens, G., Debats, O., Barentsz, J., Karssemeijer, N. & Huisman, H. Computer-aided detection of prostate cancer in MRI. IEEE Trans. Med. Imaging33, 1083–1092 (2014). [DOI] [PubMed] [Google Scholar]
  • 7.Bulten, W. et al. Automated deep-learning system for Gleason grading of prostate cancer using biopsies: A diagnostic study. Lancet Oncol.21, 233–241 (2020). [DOI] [PubMed] [Google Scholar]
  • 8.Schlemper, J. et al. Attention gated networks: Learning to leverage salient regions in medical images. Med. Image Anal.53, 197–207 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Liu, F. et al. An attention-based hybrid lstm-cnn model for arrhythmias classification, in 2019 International Joint Conference on Neural Networks (IJCNN) 1–8 (IEEE, 2019).
  • 10.Campanella, G. et al. Clinical-grade computational pathology using weakly supervised deep learning on whole slide images. Nat. Med.25, 1301–1309 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Hou, L. et al. Patch-based convolutional neural network for whole slide tissue image classification, in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition 2424–2433 (2016). [DOI] [PMC free article] [PubMed]
  • 12.Coudray, N. et al. Classification and mutation prediction from non-small cell lung cancer histopathology images using deep learning. Nat. Med.24, 1559–1567 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Codella, N. C. et al. Deep learning ensembles for melanoma recognition in dermoscopy images. IBM J. Res. Dev.61, 5 (2017). [Google Scholar]
  • 14.Buriboev, A. S., Khashimov, A., Abduvaitov, A. & Jeon, H. S. CNN-based kidney segmentation using a modified clahe algorithm. Sensors24, 7703 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Roehrborn, C. G. Benign prostatic hyperplasia: An overview. Rev. Urol.7, S3 (2005). [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

The datasets used and/or analysed during the current study are available from the corresponding author on reasonable request.


Articles from Scientific Reports are provided here courtesy of Nature Publishing Group

RESOURCES