A custom CNN architecture optimized for histopathological image classification without using pretrained weights. This implementation provides three model variants with increasing complexity and performance, specifically designed for the LC25000 dataset.
Overview
This project implements custom convolutional neural networks for classifying histopathological images into five distinct categories. The models are trained from scratch without transfer learning, demonstrating the effectiveness of carefully designed architectures for medical image analysis.
Dataset
LC25000 Lung and Colon Histopathological Image Dataset
Total Images: 25,000
Image Size: 768 x 768 pixels (resized to 224 x 224)
Number of Classes: 5
Format: RGB histopathological images
Classes
Colon Adenocarcinoma
Colon Benign Tissue
Lung Adenocarcinoma
Lung Benign Tissue
Lung Squamous Cell Carcinoma
Model Architectures
Three distinct architectures are provided, each with different complexity-performance tradeoffs:
1from lc25000_classifier import main
23# Update paths in main() function4train_directory ='path/to/train'5test_directory ='path/to/test'67# Run training8main()
Model Selection
Choose your desired architecture by uncommenting the appropriate line:
Training time varies by architecture and hardware:
Simple CNN: ~2-4 hours (GPU)
Residual Network: ~4-6 hours (GPU)
Attention Network: ~6-10 hours (GPU)
Citation
If you use this implementation, please cite the LC25000 dataset:
@article{,
title= {LC25000 Lung and colon histopathological image dataset},
keywords= {cancer,histopathology},
author= {Andrew A. Borkowski, Marilyn M. Bui, L. Brannon Thomas, Catherine P. Wilson, Lauren A. DeLand, Stephen M. Mastorides},
url= {https://github.com/tampapath/lung_colon_image_set}
}
License
This implementation is provided for research and educational purposes. Please refer to the LC25000 dataset license for data usage terms.
Acknowledgments
LC25000 dataset creators for providing high-quality histopathological images
TensorFlow team for the deep learning framework
Medical imaging community for advancing computational pathology
Contact
For questions, issues, or contributions, please open an issue in the repository.
Note: This model is intended for research purposes only and should not be used for clinical diagnosis without proper validation and regulatory approval.