To reproduce the results, download the model weights and put it under ./assets/model
.
This folder
│
| app.py
| README.md
│ Dockerfile
│
└───assets/
└─── images/
└─── outputs/
└─── model/
|
└──config.yaml
└──model_ckpt.pth
To train you own model, please refer to Detectron2 documentation . The configuration I used can be found here.
Note: During inference, set "cfg.SOLVER.IMS_PER_BATCH = 1" and "cfg.INPUT.CROP.ENABLED = False".
Note: During deployment, I set "cfg.DEVICE=cpu" since not everyone has access to GPUs. However, this does mean that the waiting time will be longer.
- Build the container
docker build . -t drone_app
- Run the App
docker run -p 8501:8501 drone_app
- Follow the URL link to view the app in browser
- Install conda for environment management (The following commands works for Linux system):
cd /tmp
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
sh Miniconda3-latest-Linux-x86_64.sh
- Set up the environment:
conda create --name drone_app python=3.9
conda activate drone_app
python -m pip install -r requirements.txt
- Run the App
streamlit run --server.address 0.0.0.0 app.py