A collection of small AI/ML projects developed during university coursework.
Includes classical "from scratch" implementations (kNN/NN, perceptrons, hinge-loss linear classifier) and deep learning models (MNIST/Fashion-MNIST/Cats vs Dogs) using TensorFlow/Keras.
All projects are inside the projects/ folder and are numbered for easy navigation:
01 cifar10-knn-nn-classifier02 linear-svm-loss-classifier03 and-or-perceptron04 xor-neural-network05 handwritten-digit-recognition06 fashion-mnist-cnn-kfold07 cats-and-dogs-classification
Each project folder contains:
- one main Python script (
.py) - a short
README.mdwith project-specific notes
From the repository root:
python -m venv .venv
Windows (PowerShell)
..venv\Scripts\activate
macOS / Linux
source .venv/bin/activate
This repository uses a single requirements.txt generated via pip freeze (full environment snapshot):
pip install -r requirements.txt
Tested with: Python 3.13.7 (Windows, venv)
Because project folder names contain spaces, use quotes when changing directories.
-
Go into a project folder: cd "projects/01 cifar10-knn-nn-classifier"
-
Run the Python script inside that folder: python <script_name>.py
Repeat the same for any project, for example: cd "projects/04 xor-neural-network" python <script_name>.py
Tip: If you are unsure about the script name, open the project folder and run the only .py file inside.
If tensorflow fails to install on your system (can happen depending on OS/Python version), try:
- Python 3.11 or 3.12
- recreate the venv and reinstall dependencies
The CIFAR-10 kNN/NN project compares test images against the full training set, which can be slow.
To speed it up, reduce the evaluated subset inside the script.
Project 07 cats-and-dogs-classification requires an external dataset:
Download and extract it, then update dataset paths in the script if needed.
Some projects display training curves using matplotlib. If plots do not show:
- try running from an IDE (PyCharm) instead of a restricted terminal
- ensure your Python installation supports a GUI backend
This repository is shared for educational purposes only.