GithubHelp home page GithubHelp logo

youtang1993 / rdsnet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wangsr126/rdsnet

0.0 2.0 0.0 5.54 MB

implement for paper: "RDSNet: A New Deep Architecture for Reciprocal Object Detection and Instance Segmentation"

License: Apache License 2.0

Python 91.55% Dockerfile 0.03% C++ 2.82% Cuda 5.51% Shell 0.09%

rdsnet's Introduction

RDSNet

The Code for "RDSNet: A New Deep Architecture for Reciprocal Object Detection and Instance Segmentation"

This repository is based on mmdetection.

architecture

Installation

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

Performance on COCO

display

Backbone Iteration MBRM Training scales APbb
(minival)
APm
(minival)
APbb
(test-dev)
APm
(test-dev)
Model
ResNet-50-FPN 90k N 800 36.8 32.1 37.2 32.6 Link
ResNet-50-FPN - Y - 37.8 32.1 38.1 32.6
ResNet-101-FPN 90k N 800 38.7 34.1 39.4 34.6 Link
ResNet-101-FPN - Y - 39.7 34.1 40.3 34.6
ResNet-101-FPN 180k N [640, 800] 40.8 36.2 40.9 36.4 Link
ResNet-101-FPN - Y - 41.8 36.2 41.8 36.4

The models with MBRM share the same parameters as those w/o MBRM, since the additional parameters in MBRM have been provided in the code.

Get Started

Once the installation is done, you can follow the below steps to test or train the model.

Assume that you have already prepared COCO dataset and downloaded the checkpoints to 'checkpoints/'.

A quick demo:

python tools/test.py configs/rdsnet/rdsnet_r50_fpn_1x.py \
    checkpoints/rdsnet_r50_fpn_1x-124f64c3.pth \
    --show

Config Files:

Config File Backbone Iteration Training scales MBRM
rdsnet_r50_fpn_1x.py ResNet-50-FPN 90k 800 N
rdsnet_refine_r50_fpn_1x.py ResNet-50-FPN - - Y
rdsnet_r101_fpn_1x.py ResNet-101-FPN 90k 800 N
rdsnet_refine_r101_fpn_1x.py ResNet-101-FPN - - Y
rdsnet_640_800_r101_fpn_2x.py ResNet-101-FPN 180k [640, 800] N
rdsnet_640_800_refine_r101_fpn_2x.py ResNet-101-FPN - - Y

All config files are in the folder: configs/rdsnet/

Test on COCO dataset:

# single-gpu testing
python tools/test ${CONFIG_FILE} ${CHECKPOINT_FILE} --out ${RESULT_FILE} [--eval ${EVAL_METRICS}] [--show]

# multi-gpu testing
./tools/dist_test.sh ${CONFIG_FILE} ${CHECKPOINT_FILE} $GPU_NUM} [--out ${RESULT_FILE}] [--eval ${EVAL_METRICS}]

Arguments:

  • CONFIG_FILE: Path to one of the file in configs/rdsnet/.
  • CHECKPOINT_FILE: Path to the checkpoints.

Optional arguments:

  • RESULT_FILE: Filename of the output results in pickle format. If not specified, the results will not be saved to a file.
  • EVAL_METRICS: Items to be evaluated on the results. Recommended values are: bbox, segm.
  • --show: If specified, detection results will be plotted on the images and shown in a new window. It is only applicable to single GPU testing. Please make sure that GUI is available in your environment, otherwise you may encounter the error like cannot connect to X server.

Train a model

Train with multiple GPUs

./tools/dist_train.sh ${CONFIG_FILE} ${GPU_NUM} [optional arguments]

Optional arguments:

  • --validate (strongly recommended): Perform evaluation at every k (default value is 1, which can be modified like this) epochs during the training.)
  • --work_dir ${WORK_DIR}: Override the working directory specified in the config file.
  • --resume_from ${CHECKPOINT_FILE}: Resume from a previous checkpoint file.

All outputs (log files and checkpoints) will be saved to the working directory, which is specified by work_dir in the config file.

*Important*: We use 4 GPUs with 2 img/gpu. The default learning rate in config files is also for 4 GPUs and 2 img/gpu (batch size= 4*2 = 8).

According to the Linear Scaling Rule, you need to set the learning rate proportional to the batch size if you use different GPUs or images per GPU, e.g., lr=0.01 for 8 GPUs * 2 img/gpu.

For some other high-level apis, please refer to GETTING_STARTED.md.

Citation

Please consider citing our paper in your publications if the project helps your research.

@misc{wang2019rdsnet,
    title={RDSNet: A New Deep Architecture for Reciprocal Object Detection and Instance Segmentation},
    author={Shaoru Wang and Yongchao Gong and Junliang Xing and Lichao Huang and Chang Huang and Weiming Hu},
    year={2019},
    eprint={1912.05070},
    archivePrefix={arXiv},
    primaryClass={cs.CV}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.