This project demonstrates the effects of noise on MNIST digit classification and the improvements achieved using denoising techniques.
This project applies Gaussian blur to noisy MNIST images and trains models to classify the digits. It compares the performance of models trained on noisy data versus cleaned data.
- data/: Contains scripts for downloading and preprocessing data.
- models/: Includes modules for training models and storing trained models.
- notebooks/: Interactive Jupyter notebooks.
- results/: Stores output plots and results.
- utils/: Utility scripts for preprocessing and visualization.
- Python 3.x
- Install dependencies:
pip install -r requirements.txt
-
Download Data:
python data/download_mnist.py
-
Train and Evaluate Models:
python models/train_model.py
-
Run the Streamlit App:
Start the Streamlit app to visualize and experiment with the project:streamlit run streamlit_app.py
To start the Streamlit app, run the following command:
streamlit run streamlit_app.py
- Use the slider to select the number of epochs for training the models.
- Use the multiselect widget to choose which digits to visualize.
- Click the "Train Model" button to start training the models with both noisy and cleaned data.
- The app will display the training progress and accuracy for both models.
- The sidebar will show the accuracy of the models trained on noisy and cleaned data.
- The main page will display a comparison image showing the original, noisy, and cleaned versions of the selected digits.
- Compare the accuracy of the models trained on noisy and cleaned data to understand the impact of denoising.
- Use the comparison image to visually inspect the effects of noise and denoising on the MNIST digits.
The project demonstrates:
- Comparison of model performance on noisy and cleaned data.
- Visualizations to highlight the effects of noise reduction.
Contributions are welcome! Follow these steps to contribute:
-
Fork the Repository:
Click the "Fork" button at the top right of this repository to create a copy under your GitHub account. -
Clone Your Fork:
Clone the forked repository to your local machine:git clone https://github.com/BunyaminYavuz/MNISTDenoisingAndClassification.git
-
Create a New Branch:
Create a branch for your feature or fix:git checkout -b feature-or-fix-name
-
Make Your Changes:
Implement your changes and test them locally. -
Commit Your Changes:
Write clear and concise commit messages:git add . git commit -m "Add description of your changes"
-
Push to GitHub:
Push your branch to your forked repository:git push origin feature-or-fix-name
-
Submit a Pull Request:
Open a pull request to the main repository with a description of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.