Code Monkey home page Code Monkey logo

meta-centernet-dior's Introduction

Introduction

  • This codebase is created to build benchmarks for few-shot learning object detection on DIOR dataset and provide a new model Meta-CenterNet.
  • It is modified from mmfewshot.

Our work

  • The loading module of DIOR dataset is provided in mmdetection module, and the configuration trained on DIOR dataset using CenternNet, Faster R-CNN, and Mask R-CNN is set up.
  • The loading module of N-way K-shot DIOR dataset is provided in mmfewshot module, and four sample category segmentation is set according to the paper.
    In addition, the configuration that uses Meta-RCNN to train on DIOR dataset is set.
  • A new model Meta-CenterNet is provided in mmfewshot module. Resnet and deconvolution network are used to extract feature map and supporting features. A new feature aggregation module CorrelationAggregator is used to convolve and combine the two features to obtain the aggregated feature map. And the detection box is extracted from the anchor-free detection head based on CenterNet. The configuration for training on DIOR dataset is set.

License

This project is released under the Apache 2.0 license.

Dependencies

Please refer to requirements.txt or follow the setup instruction of mmfewshot

Installation & Dataset Preparation

Install

MMFewShot depends on PyTorch and MMCV. Please refer to install.md for installation of MMFewShot

Dataset

Download DIOR dataset and place it under dataset folder. It should be like

/mmfewshot/data/dior/
        Annnotations/
                Horizontal_Bounding_Boxes/*.xml
                Oriented_Bounding_Boxes/*.xml
        ImageSets/Main/
                test.txt  
                train.txt  
                val.txt
        JPEGImages/*.jpg

Getting Started

DIOR datasets

  • To use DIOR datasets in object detection projects, the following can be run, to train CenterNet with DIOR dataset
  • You can train on other networks by replacing the following Settings with
    • centernet_resnet101_dcnv2_140e_dior.py
    • centernet_resnet50_dcnv2_140e_dior.py
    • centernet_resnet18_dcnv2_140e_dior.py
    • faster_rcnn_r101_caffe_fpn_1x_dior.py
    • mask_rcnn_r50_caffe_fpn_mstrain-poly_1x_dior.py
cd mmdetection-2.24.1/
python tools/train.py configs/DIOR/centernet_resnet101_dcnv2_140e_dior.py

Few-shot DIOR datasets

  • Using DIOR dataset in fewshot learning, the following can be run, to train Meta-RCNN using DIOR query suport dataset
cd mmfewshot/
python tools/detection/train.py configs/detection/dior/meta-rcnn_r101_c4_8xb4_dior-split1_base-training.py      #base training
python tools/detection/train.py configs/detection/dior/meta-rcnn_r101_c4_8xb4_dior-split1_5shot-fine-tuning.py  #fine-tuning

Use Meta-CenterNet

  • Training DIOR query suport dataset on the new implemented Meta-CenterNet can run the following
cd mmfewshot/
python tools/detection/train.py configs/detection/meta_centernet/dior/meta-centernet_r50_c4_8xb4_dior-split1_base-training.py       #base training
python tools/detection/train.py configs/detection/meta_centernet/dior/meta-centernet_r50_c4_8xb4_dior-split1_5shot-fine-tuning.py   #fine-tuning

Citing

  • DIOR dataset
@article{li2020object,
  title={Object detection in optical remote sensing images: A survey and a new benchmark},
  author={Li, Ke and Wan, Gang and Cheng, Gong and Meng, Liqiu and Han, Junwei},
  journal={ISPRS Journal of Photogrammetry and Remote Sensing},
  volume={159},
  pages={296--307},
  year={2020},
  publisher={Elsevier}
}

Thanks to the Third Party Libs

Pytorch

mmfewshot

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.