diff --git a/README.md b/README.md index cff3936..edaae19 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,18 @@ Usage: python demo.py --input-video path/to/your/input/video --weights path/to/model/weights --output-format video --output-root path/to/output/root ``` + +## docker demo example +```bash +docker build -t towards-realtime-mot docker/ + +docker run --rm --gpus all -v $(pwd)/:/Towards-Realtime-MOT -ti towards-realtime-mot /bin/bash +cd /Towards-Realtime-MOT; +python demo.py --input-video path/to/your/input/video --weights path/to/model/weights + --output-format video --output-root path/to/output/root + +``` + ## Dataset zoo Please see [DATASET_ZOO.md](https://github.com/Zhongdao/Towards-Realtime-MOT/blob/master/DATASET_ZOO.md) for detailed description of the training/evaluation datasets. ## Pretrained model and baseline models diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..c5fe6fa --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,5 @@ +FROM pytorch/pytorch:1.3-cuda10.1-cudnn7-devel + +RUN apt update && apt install -y ffmpeg libsm6 libxrender-dev +RUN pip install Cython +RUN pip install opencv-python cython_bbox motmetrics numba matplotlib sklearn diff --git a/models.py b/models.py index f5b9926..ef595e3 100644 --- a/models.py +++ b/models.py @@ -5,12 +5,15 @@ import torch.nn as nn from utils.parse_config import * from utils.utils import * -from utils.syncbn import SyncBN import time import math -batch_norm=SyncBN #nn.BatchNorm2d -#batch_norm=nn.BatchNorm2d +try: + from utils.syncbn import SyncBN + batch_norm=SyncBN #nn.BatchNorm2d +except ImportError: + batch_norm=nn.BatchNorm2d + def create_modules(module_defs): """ Constructs module list of layer blocks from module configuration in module_defs