Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1.73 KB

GETTING_STARTED.md

File metadata and controls

46 lines (34 loc) · 1.73 KB

Getting Started with RegionSpot

Installation

The codebases are built on top of Detectron2.

Requirements

  • Operating System: Linux or macOS
  • Python: Version 3.6 or newer
  • PyTorch: Version 1.9.0 or newer, along with the compatible version of torchvision. You can install both from pytorch.org.

Steps

  1. Detectron2 Installation: Install Detectron2 by following the official installation guide available here: Detectron2 Installation Guide.

  2. CLIP Installation

    Install CLIP by following the official installation guide available here: CLIP Installation.

  3. Data Preparation: Organize your data according to the instructions provided in DATA.md in this repository.

  4. Model Training: To train the RegionSpot model, use the following command templates:

    # Stage 1 Training:
    python3 train_net.py --num-gpus 8 \
        --config-file configs/objects365_bl.yaml
    
    # Stage 2 Training:
    python3 train_net.py --num-gpus 8 \
        --config-file configs/objects365_v3det_openimages_bl.yaml
    
  5. Model Evaluation: To evaluate the trained RegionSpot model, use the following command. Ensure that the MODEL.CLIP_TYPE and MODEL.CLIP_INPUT_SIZE corresponds to the particular MODEL.WEIGHTS you are using.

    python3 train_net.py --num-gpus 8 \
        --config-file configs/eval.yaml \
        --eval-only \
        MODEL.WEIGHTS /path/to/model_weights.pth \
        MODEL.CLIP_TYPE CLIP_400M_Large \
        MODEL.CLIP_INPUT_SIZE 224