The inspiration behind my Cat Breed Classifier was my own cat. He was fostered from a very young age, so we were never told what his breed was. Although he is most definitely a mix of many breeds, the idea of taking a picture of him and finding out what breed he resembled the most drew me into making this project.
What it does
Cat Breed Classifier takes a cat image file uploaded by the user, and utilizing a trained neural network, attempts to classify the breed of said cat. It also comes with built-in error proofing. If you attempt to submit an empty file or access the results page without a POST request, you will be served an apology page instead of a response page.
How we built it
This project was built using a variety of libraries for Python, most notably Pytorch and Flask. A convolutional neural network was used to learn from the dataset found on kaggle. With flask, I was able to use Python for the back-end of the webpage, allowing me to use Pytorch in the back-end of my site in tandem. With a form on the page, I would pass an image converted into a tensor into Pytorch, and use the trained neural network to predict which cat breed was uploaded. The prediction would then be shown to the user. This is all done in the back-end, through Python.
Challenges we ran into
The most notable challenge I ran into while creating this project was training the model itself. Unfortunately, the dataset chosen for this project turned out to be atrocious and was extremely skewed. Using standard neural network models on the data did not yield any results, with an overall accuracy of approximately 1%-2%. To fix this problem given more time, I would look for a better, less skewed dataset, as well as try to optimize the standard neural network model to tailor my specific data better. The second sizeable issue I faced during this project was trying to get the webpage to be accessible to everyone, instead of just being run on a localhost. By writing my program on Flask, I would be able to use a locally hosted server, but this was a cause of trouble near the end. I had to look for a service that is specifically made to deploy Flask projects, and found Heroku through research. As someone who had never used this service, it was quite a challenge to try to learn how to use it during the time crunch. I ran into a lot of errors in my program when it was uploaded to Heroku, which took up a lot of my time during the final hours of the hackathon.
Accomplishments that we're proud of
In reality, I'm proud of being able to finish an entire project in such a short amount of time; even with the number of bugs and errors in it. Ignition Hacks was the first hackathon I have ever participated in. Usually, when I begin a project, I take many days to set up my developer environment and begin to really work on the idea. In this case, I was up and coding in about a few hours. Overall, just being able to have a submittable project in such a short time frame is something that makes me very proud.
What we learned
I have learned quite a bit throughout this hackathon. I have a little bit of experience with machine learning; I took Andrew Ng's machine learning course, which taught me a lot of the mathematics behind machine learning algorithms, and helped me get an intuition towards them. However, it did not really prepare me for the applications of machine learning. Taking part in this hackathon has taught me information that I would likely have taken much longer to find otherwise, such as how to build a neural network with Pytorch, and how to use said neural network for training. Having the intuition behind something, and being able to actually apply it to a real-world project are two very different things, the latter of which I was able to spend a lot of time learning about throughout the duration of the hackathon.
What's next for Cat Breed Classifier
With Cat Breed Classifier, I would like to spend more time improving it. The entire project works well, with the exception being, arguably the most important, the neural network model. I would consider what improvements I can make to both the data and its preprocessing, and the neural network itself, to try to build an accurate cat breed detector. Updating the webpage would be as simple as changing a few lines of code, and uploading a new set of trained parameters for the neural network. Through more practice and experience, I believe that Cat Breed Classifier can be made into a wonderful project.