Visual Parser: Representing Part-whole Hierarchies with Transformers

August 7, 2021 ยท View on GitHub

This repository contains the official implementation to reproduce object detection results of ViP. It is based on mmdetection.

Results and Models

Cascade Mask R-CNN

BackbonePretrainLr Schdbox mAPmask mAP#paramsFLOPsconfiglogmodel
ViP-TiImageNet-1K1x45.339.869.2M678GconfigGoogle DriveGoogle Drive
ViP-SImageNet-1K1x48.042.087.1M725GconfigGoogle DriveGoogle Drive
ViP-MImageNet-1K1x49.943.5107.0M785G--Coming Soon

RetinaNet

BackbonePretrainLr Schdbox mAP#paramsFLOPsconfiglogmodel
ViP-TiImageNet-1k1x39.921.4M181GconfigGoogle DriveGoogle Drive
ViP-SImageNet-1k1x42.739.9M227GconfigGoogle DriveGoogle Drive
ViP-SImageNet-1k3x43.939.9M227GconfigGoogle DriveGoogle Drive
ViP-MImageNet-1k1x44.359.8M287G--Coming Soon

Notes:

Usage

Installation

Please refer to get_started.md for installation and dataset preparation.

Inference

# single-gpu testing
python tools/test.py <CONFIG_FILE> <DET_CHECKPOINT_FILE> --eval bbox segm

# multi-gpu testing
tools/dist_test.sh <CONFIG_FILE> <DET_CHECKPOINT_FILE> <GPU_NUM> --eval bbox segm

Training

To train a detector with pre-trained models, run:

# single-gpu training
python tools/train.py <CONFIG_FILE>

# multi-gpu training
tools/dist_train.sh <CONFIG_FILE> <GPU_NUM>

Citing ViP

@article{sun2021visual,
  title={Visual Parser: Representing Part-whole Hierarchies with Transformers},
  author={Sun, Shuyang and Yue, Xiaoyu, Bai, Song and Torr, Philip},
  journal={arXiv preprint arXiv:2107.05790},
  year={2021}
}