Skip to content

Latest commit

 

History

History
76 lines (59 loc) · 2.63 KB

GETTING_STARTED.md

File metadata and controls

76 lines (59 loc) · 2.63 KB

Getting Started with RandBox

Installation

The codebases are built on top of Detectron2 and Sparse R-CNN. Thanks very much.

Requirements

  • Linux or macOS with Python ≥ 3.6
  • PyTorch ≥ 1.9.0 and torchvision that matches the PyTorch installation. You can install them together at pytorch.org to make sure of this

Steps

  1. Install Detectron2 following https://github.com/facebookresearch/detectron2/blob/main/INSTALL.md#installation.

  2. Prepare datasets



The splits are present inside split/ folder. The images can be downloaded on MS-COCO/PASCAL-VOC and the annotations can be downloaded on annotations. The images should be splitted into different task directory according to the split/.

The files should be organized in the following structure:

RandBox/
└── datasets/
    └── t1/
        └── annotations/
            └──train.json
            └──test.json
        └── images/
            └──train/
            └──test/
    └── t2/
    └── t2_ft/
    └── t3/
    └── t3_ft/
    └── t4/
    └── t4_ft/
    └── Annotations/
  1. Prepare pretrain models

RandBox uses three backbones including ResNet-50, ResNet-101 and Swin-Base. The pretrained ResNet-50 model can be downloaded automatically by Detectron2. We also provide pretrained ResNet-101 and Swin-Base which are compatible with Detectron2. Please download them to RandBox_ROOT/models/ before training:

mkdir models
cd models
# ResNet-101
wget https://github.com/scuwyh2000/RandBox/releases/download/Tags/torchvision-R-101.pkl

# Swin-Base
wget https://github.com/scuwyh2000/RandBox/releases/download/Tags/swin_base_patch4_window7_224_22k.pkl

cd ..

Thanks for model conversion scripts of ResNet-101 and Swin-Base.

  1. Train RandBox
bash run.sh
  1. Evaluate RandBox
bash run_eval.sh