Hey there! Welcome to my Animal Classification Web App. It's a pretty cool project that lets you upload pictures of animals and uses machine learning to predict what kind of animal it is.
I've deployed this project live for you to check out without any hassle! You can access it here: www.animalclassificationucf.com
- Easy-to-use web interface for uploading animal images
- Predicts the animal species in real-time using a pre-trained model
- Secure file upload and processing (don't worry, your images are safe with me!)
- Logs visitor actions and interactions (just to keep track of things)
- Looks great on any device (responsive design for the win!)
- Bun.js for the server-side magic
- Python for running the machine learning model
- HTML, CSS, and JavaScript for the client-side awesomeness
- PyTorch for loading and using the pre-trained model
- Multer for handling file uploads
- Morgan and Winston for logging
- And a bunch of other dependencies (check out the package.json file)
- Clone this repo:
git clone https://github.com/your-username/animal-classification.git
- Install the dependencies:
cd animal-classification
bun install
-
Set up the environment variables:
- Create a .env file in the root directory.
- Add the necessary environment variables in the .env file (like SESSION_SECRET)
-
Start the server:
bun app.js
5.Open up the web app in your browser:
http://localhost:3000
- Choose an animal image file to upload.
- Hit the "Predict" button and let the magic happen.
- Wait for the server to do its thing and give you the predicted animal species.
- Check out the prediction result and the processed image on the web page.
The animal classification model used in this project is pre-trained and stored in the model.pth file. If you want to train your own model, here's what you can do:
- Get a dataset of animal images with labels for each species.
- Use a deep learning framework like PyTorch to define and train a classification model.
- Save the trained model as model.pth in the project directory.
- Update the predict.py script to load and use your awesome new model.
If you want to contribute to this project, that's awesome! Feel free to open an issue or submit a pull request if you have any ideas or find any bugs.
If you have any questions or just want to chat, feel free to reach out to me at [email protected]
Happy classifying!