This project demonstrates the development of a Convolutional Neural Network (CNN) for classifying COVID-19 patients based on lung X-ray images. The workflow involves preparing the dataset, building the model, training it, and evaluating its performance. This project was implemented using Google Colab for efficient and accessible computation.
This project applies deep learning techniques to classify lung X-rays as COVID-19 positive or negative. The primary focus is on leveraging CNNs to extract meaningful patterns from X-ray images and make accurate predictions.
Key highlights:
- Dataset includes X-ray images of lungs, labeled as COVID-19 positive or negative.
- Implemented and executed using Google Colab to leverage its free GPU resources.
- Built with Python and TensorFlow/Keras for CNN model implementation.
- Automated dataset downloading and preparation.
- Custom CNN architecture tailored for medical image classification.
- Training with real-time accuracy and loss visualization.
- Evaluation metrics to validate model performance, such as accuracy and confusion matrix.
Google Colab: Link (File -> Save a Copy in Drive): Google Colab
- Clone this repository:
git clone https://github.com/DaveMatNat/Covid-19-CNN.git cd Covid-19-CNN - Install the required dependencies
pip install -r requirements.txt
- Open the notebook in Google Colab
- Download the dataset:
- Use the script in the notebook to download the dataset automatically.
- Dataset contains lung X-ray images labeled for COVID-19 detection.
- Run the Jupyter Notebook:
- Execute the cells in the notebook sequentially for:
- Dataset preparation.
- Model training.
- Evaluation and visualization of results.
1. Dataset Preparation The dataset of lung X-rays is preprocessed to ensure proper resizing and normalization for input into the CNN. Train-test splits are applied to evaluate model performance.
2. Model Creation A CNN is designed with layers including convolutional, pooling, and dense layers optimized for image classification tasks.
3. Model Training The model is trained using the Adam optimizer and categorical crossentropy loss function. Training performance is monitored through metrics such as accuracy and loss.
4. Model Evaluation Evaluate the model using metrics like accuracy, precision, recall, and a confusion matrix. Visualization of model predictions is included to assess its performance.
Model's accuracy
Confusion Matrix
Contributions are welcome! Please fork the repository and submit a pull request for any features or improvements.


