Giter Club home page Giter Club logo

ikd's Introduction

Exploring Inconsistent Knowledge Distillation for Object Detection with Data Augmentation

This repository contains the official PyTorch implementation of the following paper at ACMMM 2023:

Exploring Inconsistent Knowledge Distillation for Object Detection with Data Augmentation
Jiawei Liang, Siyuan Liang, Aishan Liu, Ke Ma, Jingzhi Li, Xiaochun Cao
https://arxiv.org/abs/2209.09841

Installation

Download Dataset and Checkpoint

  • Download MS COCO2017 dataset
  • Unzip COCO dataset into data/coco/ in mmdetection/
  • Download pretrained teacher model retinanet_x101_64x4d_fpn_1x_coco_20200130-366f5af1.pth from the repository of mmdetection
  • Put the downloaded pretrained model into checkpoints/ in mmdetection/

Generate Adversarial Examples

# single GPU
python tools/ta_GT.py configs/retinanet/retinanet_x101_64x4d_fpn_1x_coco.py  checkpoints/retinanet_x101_64x4d_fpn_1x_coco_20200130-366f5af1.pth --method difgsm  --show-dir data/adv_rtn_coco_8_5 --gen_adv_aug --eps 8 --alpha 2 --steps 5
# multi GPU
bash tools/dist_adv.sh  configs/retinanet/retinanet_x101_64x4d_fpn_1x_coco.py  checkpoints/retinanet_x101_64x4d_fpn_1x_coco_20200130-366f5af1.pth  8  --method difgsm  --show-dir data/adv_rtn_coco_8_5 --gen_adv_aug --eps 8 --alpha 2 --steps 5

Train

#single GPU

# Step 1: train with DFA 
python tools/train.py configs/fgd/DFA_fgd_retina_rx101_64x4d_distill_retina_r50_fpn_2x_coco.py
# Step 2: resume from epoch 16 and train without DFA
python tools/train.py configs/fgd/fgd_retina_rx101_64x4d_distill_retina_r50_fpn_2x_coco.py --resume-from work_dirs/DFA_fgd_retina_rx101_64x4d_distill_retina_r50_fpn_2x_coco/epoch_16.pth

#multi GPU

# Step 1: train with DFA 
bash tools/dist_train.sh configs/fgd/DFA_fgd_retina_rx101_64x4d_distill_retina_r50_fpn_2x_coco.py 8
# Step 2: resume from epoch 16 and train without DFA
bash tools/dist_train.sh configs/fgd/fgd_retina_rx101_64x4d_distill_retina_r50_fpn_2x_coco.py 8 --resume-from work_dirs/DFA_fgd_retina_rx101_64x4d_distill_retina_r50_fpn_2x_coco/epoch_16.pth

Test

#single GPU
python tools/test.py configs/fgd/DFA_fgd_retina_rx101_64x4d_distill_retina_r50_fpn_2x_coco.py $PATH_CHECKPOINT --eval bbox

#multi GPU
bash tools/dist_test.sh configs/fgd/DFA_fgd_retina_rx101_64x4d_distill_retina_r50_fpn_2x_coco.py $PATH_CHECKPOINT 8 --eval bbox

Generalizability

Backdoor Defense

Index Method ASR ASR Drop
1 Victim 96.7 -
2 NAD 82.88 13.82
3 Ours 78.26 18.44(โ†‘33%)

For more recent progress in backdoor defense, please refers to the following repo:

https://github.com/JWLiang007/BD_DeCLIP.git

and switches to the bd branch.

Acknowledgement

Our code is based on the project MMDetection.

ikd's People

Contributors

hellock avatar zwwwayne avatar yhcao6 avatar hhaandroid avatar xvjiarui avatar jshilong avatar rangilyu avatar oceanpang avatar aronlin avatar bigwangyudong avatar chhluo avatar thangvubk avatar myownskyw7 avatar johnson-wang avatar v-qjqs avatar czm369 avatar erotemic avatar jbwang1997 avatar shinya7y avatar runningleon avatar tianyuandu avatar daavoo avatar ryanxli avatar zytx121 avatar yuzhj avatar mxbonn avatar melikovk avatar wswday avatar aemikachow avatar chrisfsj2051 avatar

Stargazers

Ruoyu Chen avatar day_dayup avatar

Watchers

Kostas Georgiou avatar  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.