Project for Selected Topics of Intelligent Systems.
Compares PyTorch and TensorFlow on an image classification task for cats and dogs. Trains the same neural network architecture in both frameworks and then tests the resulting models on a separate test dataset. Also provides the option to classify custom images of cats and dogs.
Create virtual environment and install from requirements.txt via pip:
pip install -r requirements.txt
Make sure you have your Kaggle Credentials as .json in:
C:\Users\ur_user\.kaggle
To download images from Kaggle run:
python main.py --download
Alternatively download them here:
https://www.kaggle.com/datasets/bhavikjikadara/dog-and-cat-classification-dataset
| Framework | Train | Test | Classify |
|---|---|---|---|
| PyTorch | python main.py --py_train |
python main.py --py_test |
python main.py --py_class |
| TensorFlow | python main.py --tf_train |
python main.py --tf_test |
python main.py --tf_class |
- Train the network first. This will save a model in the Model/ folder.
- Test the model using the test dataset to determine its accuracy.
- All information and logs will be saved in the Log/ folder.
- To classify your own images, place them in the Data/user_input/ folder and then run the classification commands.