Skip to content

Instantly share code, notes, and snippets.

@AruniRC
Last active March 13, 2018 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AruniRC/2f0af7cd75e17e10876df4e2e96f031d to your computer and use it in GitHub Desktop.
Save AruniRC/2f0af7cd75e17e10876df4e2e96f031d to your computer and use it in GitHub Desktop.
detectron docker image from Hang

Getting docker running on CentOS server

   sudo systemctl start docker
   sudo systemctl status docker
   sudo systemctl enable docker
   sudo usermod -aG docker $(whoami)

Check if it works: sudo docker run hello-world

Getting Hang's image of Detectron

  • sudo docker run -v /srv/data1/arunirc/:/detectron/data1 -e NVIDIA_VISIBLE_DEVICES=0 --runtime=nvidia --rm -it suhangpro/detectron /bin/bash
  • sudo docker run -v /srv/data1/arunirc/:/detectron/data1 --runtime=nvidia --rm -it suhangpro/detectron /bin/bash

Using my own docker container for Detectron

  • sudo docker run -v /srv/data1/arunirc/:/detectron/data1 --runtime=nvidia --rm -it arunirc/detectron-perturb /bin/bash

Commit changes to docker image

  • Get the docker ID of a running docker container: docker ps

  • sudo docker commit CONTAINER_ID arunirc/detectron-perturb

MS-COCO eval + training using Docker image of Detectron

  • Inside the docker container, create symlink to downloaded COCO folder from /detectron/lib/datasets/data.
  • Check the COCO paths inside /detectron/lib/datasets/dataset_catalog.py and confirm they match your COCO folder inside the docker.
  • Run evaluation on COCO using Detectron example:
N=8

python2 tools/test_net.py \
    --cfg configs/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_2x.yaml \
    --multi-gpu-testing \
    TEST.WEIGHTS https://s3-us-west-2.amazonaws.com/detectron/35861858/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_2x.yaml.02_32_51.SgT4y1cO/output/train/coco_2014_train:coco_2014_valminusminival/generalized_rcnn/model_final.pkl \
    NUM_GPUS $N
  • Run evaluation on specified Retinanet_R-50-FPN model
N=8
CFG_PATH=configs/12_2017_baselines/retinanet_R-50-FPN_2x.yaml
WT_PATH=/detectron/data1/Research/RetinaNet-COCO/data/models/retinanet_R-50-FPN_2x.pkl

python2 tools/test_net.py \
    --cfg ${CFG_PATH} \
    --multi-gpu-testing \
    TEST.WEIGHTS ${WT_PATH} \
    NUM_GPUS $N
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment