Code Monkey home page Code Monkey logo

defeat.pytorch's Introduction

DeFeat.pytorch Code Base

Implementation of our CVPR2021 paper Distilling Object Detectors via Decoupled Features

Abstract

Knowledge distillation is a widely used paradigm for inheriting information from a complicated teacher network to a compact student network and maintaining the strong performance. Different from image classification, object detectors are much more sophisticated with multiple loss functions in which features that semantic information rely on are tangled. In this paper, we point out that the information of features derived from regions excluding objects are also essential for distilling the student detector, which is usually ignored in existing approaches. In addition, we elucidate that features from different regions should be assigned with different importance during distillation. To this end, we present a novel distillation algorithm via decoupled features (DeFeat) for learning a better student detector. Specifically, two levels of decoupled features will be processed for embedding useful information into the student, i.e., decoupled features from neck and decoupled proposals from classification head. Extensive experiments on various detectors with different backbones show that the proposed DeFeat is able to surpass the state-of-the-art distillation methods for object detection. For example, DeFeat improves ResNet50 based Faster R-CNN from 37.4% to 40.9% mAP, and improves ResNet50 based RetinaNet from 36.5% to 39.7% mAP on COCO benchmark.

Environments

  • Python 3.7
  • MMDetection 2.x
  • This repo uses: mmdet-v2.0 mmcv-0.5.6 cuda 10.1

VOC Results

Notes:

  • Faster RCNN based model
  • Batch: sample_per_gpu x gpu_num
Model BN Grad clip Batch Lr schd box AP Model Log
R101 bn None 8x2 0.01 81.70
R101 bn None 8x2 0.02 82.27 GoogleDrive
R101 syncbn max=35 8x2 0.01 81.59
R101 syncbn None 8x2 0.02 81.83
R50 bn max=35 8x2 0.02 80.97
R50 syncbn None 8x2 0.02 80.76
R50 syncbn max=35 8x2 0.01 80.66
R50 bn None 8x2 0.01 80.52 GoogleDrive
R101-50-FGFI-w1 bn max=35 8x2 0.01 81.04 GoogleDrive
R101-50-FGFI-w2 bn max=35 8x2 0.01 81.17 GoogleDrive
R101-50-FGFI-w2 bn max=35 8x2 0.01 82.04 GoogleDrive

Acknowledgement

Our code is based on the open source project MMDetection.

defeat.pytorch's People

Contributors

ggjy 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.