Code Monkey home page Code Monkey logo

np-repmet's Introduction

Introduction

This is the codebase for the NeurIPS 2020 paper "Restoring Negative Information in Few-Shot Object Detection". The code will be continuously improved. For any questions/issues, please open an issue in this repository or email me at [email protected].

Requirements

The codebase is modified on the basis of RepMet (https://github.com/jshtok/RepMet). It is built based on Python 2.7, MXNet 1.5.1, and CUDA 10.0.130. Other packages include matplotlib, opencv-python, PyYAML, etc. You may need to change some file paths to run the code.

Preparing Data

Dataset

wget -c http://image-net.org/image/ILSVRC2017/ILSVRC2017_CLS-LOC.tar.gz

Data and Pre-trained Model

Please download the data and pre-trained model from https://cloud.tsinghua.edu.cn/f/461fd3c8ca4f46fbbc80/?dl=1 and put it in the root directory.

Code execution

NP-RepMet Evaluation:

To reconstruct the 1-shot, 5-way experiment with the NP-RepMet from the NeurIPS paper, run
python fpn/few_shot_benchmark_1_shot.py --test_name=RepMet_inloc --Nshot=1 --Nway=5 --Nquery_cat=10 --Nepisodes=500

To reconstruct the 5-shot, 5-way experiment with the NP-RepMet from the NeurIPS paper, run
python fpn/few_shot_benchmark_5_shot.py --test_name=RepMet_inloc --Nshot=5 --Nway=5 --Nquery_cat=10 --Nepisodes=500

NP-RepMet Traning:

To train the model from scratch, run
python ./experiments/fpn_end2end_train_test.py --cfg=./experiments/cfgs/resnet_v1_101_voc0712_trainval_fpn_dcn_oneshot_end2end_ohem_8.yaml

np-repmet's People

Watchers

 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.