-
Clone Detectron2 repo
git clone https://github.com/facebookresearch/detectron2.git
-
Git clone Yolov5
git clone https://github.com/ultralytics/yolov5.git
-
Create virtual environment and activate
pip install virtualenv
virtualenv venv
source venv/bin/activate
-
Install required packages
pip install -r requirements.txt
-
To run FastAPI server execute the following command in the terminal
uvicorn main:app --reload --workers 1 --host 0.0.0.0 --port 8008
-
Start the Streamlit server
streamlit run app.py
Open this link http://localhost:8501 in your favorite browser to acess Streamlit frontend.
-
You can select the model from the left sidebar. Let's select Detectron2.
-
Input an image, choose a base_model and set the threshold score and click infer.
-
You can see the objects detected by Detectron2 in the output. You can also download the output image.
-
Similarly, you can choose Yolov5 from the sidebar and input the values. Click detect.
-
You can see the objects detected by Detectron2 in the output. You can also download the output image.