Skip to content

hsouri/bob-detection

Repository files navigation

BoB-Detection

This repository is the official implementation of Object Detection and Instance Segmentation task in the Battle of the Backbones: A Large-Scale Comparison of Pretrained Models across Computer Vision Tasks.

📌 Our implementation and instructions are based on mmdetection

Installation

Step 1. Create a conda environment and activate it.

conda create --name openmmlab python=3.8 -y
conda activate openmmlab

Step 2. Install PyTorch following official instructions, e.g.

On GPU platforms:

conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.6 -c pytorch -c nvidia

Step 3. Install MMCV using MIM.

pip install -U openmim
mim install mmcv-full==1.7.0

Step 4. Install BoB-Detection.

git clone https://github.com/hsouri/bob-detection.git
cd bob-detection
pip install -v -e .
# "-v" means verbose, or more output
# "-e" means installing a project in editable mode,
# thus any local modifications made to the code will take effect without reinstallation.

Step 5. Download COCO (LVIS) and unzip dataset (you can optionally delete downloaded zip files by passing '--delete').

COCO download:

python tools/misc/download_dataset.py --dataset-name coco2017 --unzip

LVIS download:

python tools/misc/download_dataset.py --dataset-name lvis --save-dir data/lvis_v1/ --unzip
cd data/lvis_v1/
mkdir annotations
mv lvis_v1_train.json annotations/
mv lvis_v1_val.json annotations/

Please refer to Get Started, Dataset Prepare, and Dataset Download for more detailed instructions.

Usage

The config files for all experiments in Battle of the Backbones (BoB) can be found configs/bob.

To train a detector with the existing configs, run:

bash ./tools/dist_train.sh <CONFIG_FILE> <GPU_NUM>

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages