This repository contains our STA314 project work on classifying pet facial expressions into Angry, Happy, and Sad.
The final and best-performing approach in this repo is the tree-based modeling workflow in ensemble_trees.ipynb. If you want the notebook that represents the final model, start there.
-
combined_code.ipynbA combined notebook that places the code from the tree-based workflow, logistic regression baseline, and MobileNetV2 workflow into a single file. The notebook is ordered with trees first, followed by logistic regression, then MobileNetV2, and includes markdown cells introducing each model section. -
ensemble_trees.ipynbThe final notebook and strongest model in the repository. This notebook builds the tree-based pipeline, compares feature combinations, and develops the final tree-oriented approach used for the project conclusions. -
MobilenetV2.ipynbA transfer-learning notebook usingMobileNetV2for image classification. This is part of the deep learning exploration, but it is not the final model we selected. -
logisticregression.pyA baseline script that converts images to grayscale, resizes them, flattens them into vectors, and fits a logistic regression classifier. This serves as a simpler benchmark against the more advanced models. -
eda.ipynbExploratory data analysis notebook for inspecting the dataset, image sizes, preprocessing choices, and dataset structure before training the main models.
-
data/classification-of-pet-facial-expression/The dataset directory containing the train and test image folders used by the notebooks and scripts. -
data/classification-of-pet-facial-expression.zipA zipped copy of the dataset. -
LICENSEProject license file. -
.gitignoreGit ignore rules for local machine artifacts.