GithubHelp home page GithubHelp logo

aqsc / fewx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fanq15/fewx

0.0 1.0 0.0 4.78 MB

FewX is an open-source toolbox on top of Detectron2 for data-limited instance-level recognition tasks.

Home Page: https://github.com/fanq15/FewX

Shell 0.70% Python 99.30%

fewx's Introduction

FewX

FewX is an open source toolbox on top of Detectron2 for data-limited instance-level recognition tasks, e.g., few-shot object detection, few-shot instance segmentation, partially supervised instance segmentation and so on.

All data-limited instance-level recognition works from Qi Fan (HKUST, [email protected]) are open-sourced here.

To date, FewX implements the following algorithms:

  • FSOD: few-shot object detection.
  • CPMask: partially supervised/fully supervised/few-shot instance segmentation (to be released).

Highlights

  • State-of-the-art performance.
    • FSOD is the best few-shot object detection model. (This model can be directly applied to novel classes without finetuning. And finetuning can bring better performance.)
    • CPMask is the best partially supervised/few-shot instance segmentation model.
  • Easy to use. You only need to run 3 code lines to conduct the entire experiment.
    • Install Pre-Built Detectron2 in one code line.
    • Prepare dataset in one code line. (You need to first download the dataset and change the data path in the script.)
    • Training and evaluation in one code line.

Updates

  • FewX has been released. (09/08/2020)

Results on MS COCO

Few Shot Object Detection

Method Training Dataset Evaluation way&shot box AP download
FSOD (paper) COCO (non-voc) full-way 10-shot 11.1 -
FSOD (this implementation) COCO (non-voc) full-way 10-shot 12.0 model | metrics

The results are reported on the COCO voc subset with ResNet-50 backbone.

The model only trained on base classes is base model .

You can reference the original FSOD implementation on the Few-Shot-Object-Detection-Dataset.

Step 1: Installation

You only need to install detectron2. We recommend the Pre-Built Detectron2 (Linux only) version with pytorch 1.5. I use the Pre-Built Detectron2 with CUDA 10.1 and pytorch 1.5 and you can run this code to install it.

python -m pip install detectron2 -f \
  https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.5/index.html

Step 2: Prepare dataset

  • Prepare for coco dataset following this instruction.

  • cd datasets, change the DATA_ROOT in the generate_support_data.sh to your data path and run sh generate_support_data.sh.

cd FewX/datasets
sh generate_support_data.sh

Step 3: Training and Evaluation

Run sh all.sh in the root dir. (This script uses 4 GPUs. You can change the GPU number. If you use 2 GPUs with unchanged batch size (8), please halve the learning rate.)

cd FewX
sh all.sh

TODO

  • Add other dataset results to FSOD.
  • Add CPMask code with partially supervised instance segmentation, fully supervised instance segmentation and few-shot instance segmentation.

Citing FewX

If you use this toolbox in your research or wish to refer to the baseline results, please use the following BibTeX entries.

@inproceedings{fan2020fsod,
  title={Few-Shot Object Detection with Attention-RPN and Multi-Relation Detector},
  author={Fan, Qi and Zhuo, Wei and Tang, Chi-Keung and Tai, Yu-Wing},
  booktitle={CVPR},
  year={2020}
}

@inproceedings{fan2020cpmask,
  title={Commonality-Parsing Network across Shape and Appearance for Partially Supervised Instance Segmentation},
  author={Fan, Qi and Ke, Lei and Pei, Wenjie and Tang, Chi-Keung and Tai, Yu-Wing},
  booktitle={ECCV},
  year={2020}
}

Special Thanks

Detectron2, AdelaiDet, centermask2

fewx's People

Contributors

fanq15 avatar ze-yang avatar

Watchers

James Cloos avatar

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.