- DeepCancer — Hybrid Swin Transformer + ConvNeXt for Breast Histopathology
- DeepCancer — Hybrid Swin Transformer + ConvNeXt for Breast Histopathology
DeepCancer — Hybrid Swin Transformer + ConvNeXt for Breast Histopathology
DeepCancer is a research-oriented deep learning system for breast cancer classification from histopathological images.
The proposed architecture combines Swin Transformer and ConvNeXt in a hybrid model designed to capture both local tissue features and global contextual information.
DeepCancer — Hybrid Swin Transformer + ConvNeXt for Breast Histopathology
DeepCancer is a research-oriented deep learning system for breast cancer classification from histopathological images.
The proposed architecture combines Swin Transformer and ConvNeXt in a hybrid model designed to capture both local tissue features and global contextual information.
The research investigates two classification tasks:
- Binary classification: Benign vs. Malignant
- Eight-class classification: Eight breast tumor subtypes
DeepCancer was developed as part of the research study “Histopathological Breast Cancer Classification Using a Hybrid Swin Transformer and ConvNeXt Architecture” by Murat Onur Kaderoğlu and Emre Şatır.
Project website: https://deepcancer.org
Publication: https://doi.org/10.5281/zenodo.18138734
DeepCancer Research Prototype
The images above show the DeepCancer research prototype and its user-facing workflow.
Model Architecture
DeepCancer combines two complementary computer vision architectures:
- ConvNeXt for local feature extraction and spatial representation
- Swin Transformer for hierarchical contextual representation using window-based self-attention
The hybrid architecture is designed to combine the local feature extraction capabilities of convolutional neural networks with the global contextual modeling capabilities of vision transformers.
The system was implemented using PyTorch.
Dataset
The research was conducted using the open-access BreaKHis (Breast Cancer Histopathological Image Classification) dataset.
BreaKHis contains 7,909 H&E-stained histopathological images from 82 patients, acquired at four magnification levels:
- 40×
- 100×
- 200×
- 400×
The original images have a resolution of 700 × 460 pixels and were resized to 224 × 224 pixels for model processing.
The BreaKHis dataset and its images are not redistributed through this repository.
Classification Tasks
Binary Classification
The binary model distinguishes between:
- Benign
- Malignant
Eight-Class Classification
The multiclass model distinguishes between eight histopathological tumor subtypes.
Benign:
- Adenosis
- Fibroadenoma
- Phyllodes tumor
- Tubular adenoma
Malignant:
- Ductal carcinoma
- Lobular carcinoma
- Mucinous carcinoma
- Papillary carcinoma
Training
Training was performed using PyTorch in a Google Colab environment with an NVIDIA A100 GPU.
The models were trained for 20 epochs using the Adam optimizer and Cross-Entropy Loss.
For binary classification, a batch size of 32 and a constant learning rate were used. The multiclass configuration used StepLR scheduling.
Early stopping was applied when validation loss ceased to improve.
Evaluation Results
The following experimental results are reported in the associated publication.
Binary Classification
| Metric | Result |
|---|---|
| Accuracy | 98.86% |
| Precision | 99.07% |
| Recall | 99.25% |
| F1 Score | 99.16% |
Eight-Class Classification
| Metric | Result |
|---|---|
| Accuracy | 93.49% |
| Precision | 93.46% |
| Recall | 93.49% |
| F1 Score | 93.43% |
These results represent experimental performance on the BreaKHis dataset under the evaluation methodology described in the associated publication.
They should not be interpreted as independently validated clinical performance.
Explainability
DeepCancer incorporates Grad-CAM (Gradient-weighted Class Activation Mapping) visualization to provide visual information about image regions contributing to model predictions.
The research prototype includes a desktop application supporting image input, model prediction, Grad-CAM visualization, offline operation, and CPU fallback.
Intended Use
DeepCancer is intended for artificial intelligence research, histopathological image classification research, explainable AI experimentation, academic evaluation, and educational use.
Limitations
The reported models were trained and evaluated using a single public dataset.
Performance on BreaKHis does not establish generalization to images from other institutions, scanners, staining protocols, tissue preparation procedures, patient populations, or clinical workflows.
Further multi-institutional and prospective clinical validation is required before real-world clinical deployment.
Clinical Disclaimer
DeepCancer is a research and educational system and is not intended for standalone clinical diagnosis, treatment decisions, or autonomous medical decision-making.
Model predictions must not replace evaluation by qualified healthcare professionals.
Model and Data Availability
This Hugging Face repository serves as public technical documentation for the DeepCancer research project.
Model weights, including trained .pth files, are not publicly distributed through this repository.
Training data and BreaKHis dataset images are also not redistributed through this repository.
Publication
Histopathological Breast Cancer Classification Using a Hybrid Swin Transformer and ConvNeXt Architecture
Authors: Murat Onur Kaderoğlu, Emre Şatır
Journal: Journal of Artificial Intelligence with Applications
Year: 2025
DOI: https://doi.org/10.5281/zenodo.18138734
Project
DeepCancer: https://deepcancer.org
About TankDev
DeepCancer is presented on Hugging Face by TankDev, a software engineering and applied AI organization focused on custom software, artificial intelligence, process automation, and system integration.
TankDev: https://tankdev.tech