Skip to content

MaxiusDT/Zoidberg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

T-AIA-810: Machine Learning Projects

A collection of machine learning and deep learning projects developed for the Epitech AI courses. This repository contains two main projects: MNIST digit classification and chest X-ray pneumonia detection.

Table of Contents

Project Structure

T-AIA-810/
├── MNIST/
│   ├── notebook.ipynb          # Jupyter notebook for MNIST project
│   └── csv/
│       ├── sample_submission.csv
│       ├── test.csv
│       └── train.csv
└── Zoidberg/
    ├── notebook.ipynb          # Jupyter notebook for chest X-ray classification
    ├── requirements.txt        # Python dependencies
    └── chest_xray/
        ├── train/              # Training dataset
        │   ├── NORMAL/
        │   └── PNEUMONIA/
        ├── test/               # Test dataset
        │   ├── NORMAL/
        │   └── PNEUMONIA/
        └── val/                # Validation dataset
            ├── NORMAL/
            └── PNEUMONIA/

MNIST Project

Overview

The MNIST project focuses on classifying handwritten digits (0-9) using machine learning techniques. The project utilizes the popular MNIST dataset containing 70,000 images of handwritten digits.

Files

  • notebook.ipynb: Interactive Jupyter notebook containing the complete MNIST analysis and classification pipeline
  • csv/train.csv: Training dataset with features and labels
  • csv/test.csv: Test dataset for predictions
  • csv/sample_submission.csv: Sample submission format for results

Key Features

  • Data exploration and visualization
  • Digit classification model training
  • Performance evaluation on test data

Zoidberg Project

Overview

The Zoidberg project is a deep learning application designed to detect pneumonia from chest X-ray images. Using convolutional neural networks (CNN), this project classifies X-ray images as either normal or showing signs of pneumonia.

Files

  • notebook.ipynb: Complete Jupyter notebook with data loading, model training, and evaluation
  • requirements.txt: Python package dependencies
  • chest_xray/: Directory containing the image dataset
    • train/: Training images (NORMAL and PNEUMONIA classes)
    • test/: Test images (NORMAL and PNEUMONIA classes)
    • val/: Validation images (NORMAL and PNEUMONIA classes)

Key Features

  • Medical image classification using deep learning
  • CNN architecture implementation
  • Image data augmentation
  • Model training and validation
  • Performance metrics evaluation

Dataset Structure

The chest X-ray dataset is organized into three subsets:

  • Training Set: Used to train the neural network model
  • Validation Set: Used to tune hyperparameters and prevent overfitting
  • Test Set: Used for final model evaluation

Each subset contains two classes:

  • NORMAL: Chest X-rays showing no pneumonia
  • PNEUMONIA: Chest X-rays showing pneumonia infection

General Setup

Virtual Environment Setup

To set up a Python virtual environment for these projects:

  1. Create a virtual environment:

    # Using VS Code command palette:
    # F1 > Python: Create Environment
    
    # Or using command line:
    python -m venv .venv
  2. Activate the virtual environment:

    On Windows:

    .venv\Scripts\activate

    On macOS/Linux:

    source .venv/bin/activate
  3. Deactivate the virtual environment:

    deactivate

Installation

Project-Specific Dependencies

Zoidberg Project Dependencies

Install the required packages for the Zoidberg project:

pip install -r Zoidberg/requirements.txt

The following packages are required:

  • tensorflow: Deep learning framework for building neural networks
  • matplotlib: Data visualization library
  • pandas: Data manipulation and analysis
  • numpy: Numerical computing library
  • pydot: Graphviz interface for graph visualization

MNIST Project Dependencies

For the MNIST project, install the following packages:

pip install pandas ipykernel pyarrow matplotlib numpy

Package descriptions:

  • pandas: Data loading and manipulation from CSV files
  • ipykernel: Jupyter kernel for running Python notebooks
  • pyarrow: Efficient data serialization
  • matplotlib: Visualization of digit images and predictions
  • numpy: Numerical operations and array handling

Jupyter Setup

Both projects use Jupyter notebooks. To use them:

  1. Install Jupyter:

    pip install jupyter
  2. Launch Jupyter:

    jupyter notebook
  3. Navigate to the project folder and open the respective notebook.ipynb file.

Usage

Running the MNIST Project

  1. Navigate to the MNIST directory
  2. Open the notebook.ipynb file in Jupyter
  3. Execute the cells sequentially to:
    • Load and explore the training data
    • Visualize sample digits
    • Calculate statistics for each digit class
    • Train your classification model
    • Evaluate on test data
  4. View predictions and performance metrics

Running the Zoidberg Project

  1. Navigate to the Zoidberg directory
  2. Activate your virtual environment
  3. Install dependencies: pip install -r requirements.txt
  4. Open the notebook.ipynb file in Jupyter
  5. Execute the notebook cells to:
    • Load chest X-ray images from the dataset directories
    • Display sample X-ray images from both classes
    • Preprocess and augment image data
    • Build the CNN architecture
    • Train the neural network on the training dataset
    • Validate performance on the validation set
    • Evaluate final results on the test set
    • Generate predictions and confusion matrix

Data Loading Examples

MNIST Data Loading

import pandas as pd

dataArray = pd.read_csv('csv/train.csv')
print(dataArray.head())

Zoidberg Image Loading

import os
from tensorflow.keras.preprocessing.image import load_img

train_path = 'chest_xray/train'
classes = os.listdir(train_path)

# List images in NORMAL class
normal_dir = os.path.join(train_path, 'NORMAL')
normal_images = os.listdir(normal_dir)
print(f'Number of normal X-rays: {len(normal_images)}')

Technical Details

MNIST Specifications

  • Input: 28×28 pixel grayscale images
  • Output: 10 classes (digits 0-9)
  • Data Format: CSV with pixel values and labels

Zoidberg Specifications

  • Input: Chest X-ray images (variable resolution)
  • Output: Binary classification (NORMAL vs PNEUMONIA)
  • Model Type: Convolutional Neural Network (CNN)
  • Image Processing: Data augmentation using ImageDataGenerator
  • Evaluation: Accuracy, Precision, Recall, F1-score

Requirements

  • Python 3.7 or higher
  • pip (Python package manager)
  • Jupyter Notebook
  • All dependencies listed in respective requirements files

Notes

  • Both projects are designed to be educational and demonstrate machine learning and deep learning concepts
  • The Zoidberg project uses real medical imaging data for pneumonia detection
  • Ensure your virtual environment is activated before installing packages or running notebooks
  • GPU support is optional but recommended for faster training in the Zoidberg project

License

These projects are part of the Epitech AI coursework (T-AIA-810).


Last Updated: February 2026

About

A collection of machine learning and deep learning projects developed for the Epitech AI courses. This repository contains two main projects: MNIST digit classification and chest X-ray pneumonia detection.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors