Leaf_AI is a deep learning–powered web application that classifies leaf images into their corresponding plant species. Built using TensorFlow and Streamlit, the model supports over 35 species — identifying whether a leaf belongs to Angiospermae or Gymnospermae plant groups.
- 🌱 Classifies leaf images into detailed Latin plant species names
- 🧬 Differentiates between Gymnospermae and Angiospermae
- 📸 Supports both image upload and real-time camera input
- 📊 Provides confidence score with each prediction
- 💻 Streamlit web interface for ease of use
- Image input size:
150x150 - Model format:
Keras (.keras) - Custom evaluation metric: F1-score
- Prediction pipeline includes preprocessing with OpenCV and Keras
- Python
- TensorFlow / Keras
- OpenCV
- Streamlit
- NumPy / PIL
-
Clone the repository
git clone https://github.com/HadiR-13/Leaf_AI.git cd Leaf_AI -
Create virtual environment (optional but recommended)
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Ensure your model file is available
- Model file:
leaf_latin_model.keras - Test images folder:
./Test_AI/
- Model file:
Run the Streamlit app:
streamlit run app.pyUse the sidebar to choose between uploading an image or using your device's camera.
Pull requests are welcome! For major changes, please open an issue first to discuss what you'd like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/foo) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/foo) - Create a new Pull Request
This project is licensed under the MIT License.