This project implements a Convolutional Neural Network (CNN) to classify lung cancer images into three categories: benign cases, malignant cases, and normal cases. The dataset is divided into training, validation and test sets to evaluate the model's performance.
This project aims to create a reliable CNN model to predict lung cancer from CT scan images. The model classifies images into one of three categories:
- Normal
- Benign cases
- Malignant cases
The dataset(IQ-OTH/NCCD) Iraq Oncology/National Center for Cancer Diseases lung cancer dataset from kaggle. It includes CT scan of patients diagnosed with lung cancer in different stages, as well as healthy subjects. The dataset contains a 1190 images including normal, benign, and malignant cases.
To run this project, you will need to install the following dependencies:

Place your dataset in the "Lung_cancer_dataset" directory with the following structure

The CNN model is built using Keras and TensorFlow, with the following layers:
- Convolutional Layers: Extract features from images.
- Max Pooling Layers: Downsample the spatial dimensions.
- Fully Connected Layers: Perform classification based on the extracted features.
- Activation Functions: ReLU for hidden layers and Softmax for the output layer.
- Optimizer: Adam
- Loss Function: Categorical Crossentropy
- Metrics: Accuracy
- Callbacks: EarlyStopping and overfitting The model is trained for 50 epochs with early stopping based on validation loss
- Final Training Accuracy: 99.77%
- Final Validation Accuracy: 97.92%
- The Keras and TensorFlow libraries provide powerful tools to build and train neural networks
Feel free to customize this README further to better fit your specific project details or personal preferences.

