This project is currently under development. It is a Flask-based web application for uploading and classifying images. Below is a brief overview of the project's setup and functionality.
To get started with the project, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/image-classification.git cd image-classification
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
Set up the necessary configurations in the main.py
file.
UPLOAD_FOLDER
: The folder where uploaded files will be stored.ALLOWED_EXTENSIONS
: Allowed file extensions for uploads.SECRET_KEY
: A secret key for session management.
To run the application, use the following command:
python main.py
The application will be available at http://127.0.0.1:5000/
.
/
: Home page displaying a welcome message./upload_form
: Page to upload images for classification./upload
: Endpoint to handle file uploads and classification.
Files can be uploaded through the /upload_form
route. The uploaded file must be of type .jpg
or .jpeg
.
<form action="/upload" method="post" enctype="multipart/form-data">
<input type="file" name="file">
<input type="submit" value="Upload">
</form>
The uploaded image is processed and classified using a predefined model. The results, including the label and confidence percentage, are displayed on the result page.
Contributions are welcome! Please fork the repository and create a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.