This is just a simple demo application built by Gradio.
You can just refer to DiffusionDet for basic environment preparation, where we just add gradio package additionally.
Specifically,
conda create -n diffusiondet python=3.7
conda activate diffusiondet
pip install 'git+https://ghproxy.com/https://github.com/facebookresearch/detectron2.git'
pip install gradio
# In Linux, prepare model weights by
mkdir models && wget https://ghproxy.com/https://github.com/ShoufaChen/DiffusionDet/releases/download/v0.1/diffdet_coco_swinbase.pth -P ./models/
# In Windows, prepare model weights manually
Otherwise, you can just use our docker image hosted on AliYun, and the correponding Dockerfile is located at here.
docker pull registry.cn-hangzhou.aliyuncs.com/mrxir/diffusiondet.demo:model-executable-v2.0
By local environment:
- In Linux, just run
./gradio_demo.sh
under this repo root directory. - In Windows, just run
python gradio_demo.py
under created diffusiondet conda virtual environment
By docker container:
Just run docker run -it --rm -p 7860:7860 registry.cn-hangzhou.aliyuncs.com/mrxir/diffusiondet.demo:model-executable-v2.0
in any OS terminal with docker installed.
After deploy the gradio web application, you can just enter your localhost in browser.