Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 1.56 KB

README.md

File metadata and controls

66 lines (47 loc) · 1.56 KB

Faster-RCNN model

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.

Run the APP with Docker

  1. Build the container
docker build . -t drone_app
  1. Run the App
docker run -p 8501:8501 drone_app
  1. Follow the URL link to view the app in browser

Run the APP without Docker

  1. 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
  1. Set up the environment:
conda create --name drone_app python=3.9
conda activate drone_app
python -m pip install -r requirements.txt
  1. Run the App
streamlit run --server.address 0.0.0.0 app.py