This project is a Flask web application that leverages the power of the Detectron2 library for instance segmentation. Instance segmentation is a computer vision task that involves identifying and delineating individual objects within an image. Detectron2, developed by Facebook AI Research (FAIR), is a state-of-the-art object detection and segmentation library.
- User Interface
- Streamlit User Interface
Follow these steps to get started with the project.
git clone git@github.com:SHOCKWAVE07/Detectron2-FlaskApp.git
cd Detectron2-FlaskApp
conda create --name your-env-name python=3.8
conda activate your-env-name
pip install -r requirements.txt
conda install pytorch torchvision torchaudio cudatoolkit=11.0 -c pytorch
git clone https://github.com/facebookresearch/detectron2.git
cd detectron2
pip install -e .
cd ..
- Flask App
python run.py
- Streamlit App
streamlit run streamlit_app.py
-
Instance Segmentation: Utilizes a pre-trained Detectron2 model to perform instance segmentation on images.
-
User-friendly Interface: Provides a user-friendly web interface for users to upload images and visualize the segmentation results.
-
Flask Web Application: Developed using the Flask web framework, making it easy to deploy and interact with the application.
-
Conda Environment: Comes with a recommended conda environment to ensure a consistent and reproducible development environment.
-
User Uploads Image: Users can upload images through the web interface.
-
Instance Segmentation: The uploaded image is processed using a pre-trained Detectron2 model for instance segmentation.
-
Result Display: The segmented image is displayed back to the user, showcasing the detected instances with color-coded masks.
-
Easy Deployment: The application is designed for easy deployment, allowing users to run it locally or deploy it on a server.
- Python 3.x
- Conda (for managing the virtual environment)
- Detectron2 library
- Flask
- Clone the repository.
- Create a conda environment and install dependencies.
- Run the Flask application using
python run.py
. - Access the application at http://localhost:5000 in your web browser.
For more details or customizations, refer to the project's documentation or contact the project maintainers. Enjoy exploring instance segmentation with Detectron2.