This project is a Streamlit-based web application that allows users to upload an image and have it classified by an AI model. It utilizes the MobileNetV2 architecture, pre-trained on the ImageNet dataset, to predict the top three labels and their confidence scores for the uploaded image.
- Features
- Tech Stack
- Installation
- Usage
- Project Structure
- Contributing
- License
- Important Links
- Footer
- Image Upload: Allows users to upload images in JPG, JPEG, and PNG formats.
- AI-Powered Classification: Employs a pre-trained MobileNetV2 model for image recognition.
- Top Predictions: Displays the top 3 predicted labels and their confidence scores.
- User-Friendly Interface: Built with Streamlit for an intuitive and interactive user experience.
- Cached Model Loading: Efficiently loads the AI model using Streamlit's caching mechanism for faster subsequent predictions.
- Language: Python
- Frameworks/Libraries:
- Streamlit: For building the interactive web application.
- TensorFlow/Keras: For the machine learning model (MobileNetV2).
- OpenCV: For image processing tasks.
- NumPy: For numerical operations.
- Pillow (PIL): For image manipulation.
To set up and run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/leealtair/Image_Classifier.git cd Image_Classifier -
Install dependencies using pip:
pip install -r requirements.txt
Alternatively, based on
pyproject.toml:pip install opencv-python>=4.13.0.92 streamlit>=1.58.0 tensorflow>=2.21.0
-
Run the Streamlit application:
streamlit run main.py
This application provides a simple web interface for classifying images:
- Run the application using the command
streamlit run main.py. - Open your web browser and navigate to the local URL provided by Streamlit (usually
http://localhost:8501). - Upload an image by clicking the "Choose an image..." button and selecting a file from your local machine (supports JPG, JPEG, PNG).
- Click the "Classify Image" button to get the AI's predictions.
- The application will display the uploaded image and then list the top 3 predicted labels with their corresponding confidence percentages.
Real-world Use Case: This tool can be used for educational purposes, quick image content identification, or as a starting point for more complex image analysis applications.
Image_Classifier/
├── README.md
├── pyproject.toml
├── main.py
├── .python-version
└── uv.lock
README.md: This file, containing project documentation.pyproject.toml: Project metadata and dependencies.main.py: The main entry point for the Streamlit application, containing the image classification logic..python-version: Specifies the Python version (though content is empty).uv.lock: A lock file, likely for dependency management (content is large and unspecified).
Contributions are welcome! If you have suggestions for improvements or new features, please fork the repository and create a pull request. You can also open an issue with the tag "enhancement".
This project is licensed under the MIT License - see the LICENSE file for details.
- Repository URL: https://github.com/leealtair/Image_Classifier
This README was generated based on the analysis of the Image_Classifier repository.
- Repository: Image_Classifier
- Author: leealtair
- Contact: Please refer to the repository for contact information.
Feel free to fork this repository, like it, give it a star ⭐, and report any issues!
© 2026 LeeAltair. All Rights Reserved.