This project aims to detect and classify different animal species using deep learning. Leveraging the ResNet50 architecture, the model is fine-tuned on a dataset of animal images to achieve high accuracy in classification. A Streamlit web application is also included to allow users to upload images and receive predictions in real-time.
- Deep Learning Model: Utilizes a pre-trained ResNet50 model fine-tuned for animal classification.
- Data Augmentation: Enhances the dataset with various transformations for robust training.
- Streamlit Web App: Provides an intuitive interface for users to interact with the model.
- GPU Support: Optimized for GPU training to speed up computations.
main.py: Contains the training pipeline for the model.streamlit_app.py: Hosts the Streamlit web application for real-time predictions.DL_project.keras: The trained model file.class_names.npy: File containing the class labels.
Ensure you have the following libraries installed:
- TensorFlow
- NumPy
- Matplotlib
- PIL (Pillow)
- Streamlit
- patool
- shutil
You can install these dependencies using the following command:
pip install tensorflow numpy matplotlib pillow streamlit patool-
Place your dataset in a
.rarfile with the folder structure: -
Update the path to your
.rarfile in thetrain_modelfunction ofmain.py.
Run the main.py script to train the model:
python main.pyTo run the web application:
- Place the trained model (
DL_project.keras) and class labels file (class_names.npy) in the project directory. - Update the
MODEL_PATHandCLASS_NAMES_PATHvariables instreamlit_app.pyto reflect the correct paths. - Start the Streamlit app:
streamlit run streamlit_app.py- Access the app in your browser at
http://localhost:8501/.
- Training: Customize the
train_modelfunction inmain.pyto adapt to different datasets. - Web App: Upload an image through the Streamlit interface to classify it and view the predicted class with a confidence score.
- Ahmed Soudy Tawfik Ahmed
- Mustafa Gaser Mekhemar
- Elsayed Osama Elsayed
- Mahmoud Foad Sleem
- Islam Ragab Ahmed
- Ahmed Reda Farag
- Model Accuracy: Achieved a high validation accuracy through fine-tuning.
- Loss Metrics: Demonstrated convergence with minimal overfitting as visualized in the training history plots.
- Expanding the dataset for broader classification.
- Integrating additional architectures for comparative analysis.
- Deploying the app on cloud platforms for wider accessibility.