This is a deep learning application that uses a Convolutional Neural Network (CNN) algorithm to classify images as either human or horse. The app is built using the Python Flask framework and provides a web interface for users to upload images and receive predictions.
-
Clone the repository: git clone https://github.com/ripa01/Horse-or-Human.git
-
Change into the project directory: cd Horse-or-Human
-
Install the required dependencies: pip install -r requirements.txt
-
Start the Flask server: flask run
-
Open a web browser and go to 'http://localhost:5000' to access the application.
-
Open a web browser and go to http://localhost:5000 to access the application.
-
Upload an image by clicking on the "Upload Image" button.
-
Wait for the prediction result to be displayed, indicating whether the image contains a human or a horse.
The model used in this application is pre-trained. However, if you wish to train your own model or fine-tune the existing model, follow these steps:
-
Prepare your dataset with labeled images of humans and horses.
-
Split the dataset into training and validation sets.
-
Modify the model architecture or hyperparameters if necessary.
-
Train the model using the training dataset.
-
Evaluate the model using the validation dataset.
-
Save the trained model.
-
Replace the existing model file ('horse_or_human.h5') in the project directory with your trained model.