Skip to content

Instantly share code, notes, and snippets.

@qzane
Created November 10, 2019 19:46
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 qzane/37a15f201a898f839c708287e76997fa to your computer and use it in GitHub Desktop.
Save qzane/37a15f201a898f839c708287e76997fa to your computer and use it in GitHub Desktop.
detectron2-on-longleaf.md

how to run detectron2 on longleaf

1. install anaconda

module add anaconda
module add gcc/4.9.1
module add cuda/9.2
module save

2. create environment

  1. Python>=3.6
  2. Pytorch 1.3
  3. OpenCV
conda create --name py36 python=3.6
echo ". /nas/longleaf/apps/anaconda/4.3.0/anaconda/etc/profile.d/conda.sh" >> ~/.bashrc
bash
conda activate py36
pip install opencv-contrib-python
conda install pytorch==1.3 torchvision cudatoolkit=9.2 -c pytorch
conda install cython
pip install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'
pip install git+https://github.com/facebookresearch/fvcore.git # ignore the error message
# cd /pine/scr/q/z/qzane # modify the path 
git clone "https://github.com/facebookresearch/detectron2"
cd detectron2
python setup.py build develop

prepare data

Annotation

mkdir:

data
 └── VOC2007
 ├── Annotations
 │ ├── 0.xml
 │ ├── ...
 │ └── 9.xml
 └── JPEGImages
 ├── 0.jpg
 ├── ...
 └── 9.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment