ikd

Official implementation of "Exploring Inconsistent Knowledge Distillation for Object Detection with Data Augmentation" (ACMMM2023)

https://github.com/jwliang007/ikd

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Official implementation of "Exploring Inconsistent Knowledge Distillation for Object Detection with Data Augmentation" (ACMMM2023)

Basic Info
  • Host: GitHub
  • Owner: JWLiang007
  • License: apache-2.0
  • Language: Python
  • Default Branch: v1
  • Homepage:
  • Size: 38 MB
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

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 retinanetx10164x4dfpn1xcoco20200130-366f5af1.pth from the repository of mmdetection
  • Put the downloaded pretrained model into checkpoints/ in mmdetection/

Generate Adversarial Examples

```bash

single GPU

python tools/taGT.py configs/retinanet/retinanetx10164x4dfpn1xcoco.py checkpoints/retinanetx10164x4dfpn1xcoco20200130-366f5af1.pth --method difgsm --show-dir data/advrtncoco85 --genadvaug --eps 8 --alpha 2 --steps 5

multi GPU

bash tools/distadv.sh configs/retinanet/retinanetx10164x4dfpn1xcoco.py checkpoints/retinanetx10164x4dfpn1xcoco20200130-366f5af1.pth 8 --method difgsm --show-dir data/advrtncoco85 --genadvaug --eps 8 --alpha 2 --steps 5 ```

Train

```bash

single GPU

Step 1: train with DFA

python tools/train.py configs/fgd/DFAfgdretinarx10164x4ddistillretinar50fpn2xcoco.py

Step 2: resume from epoch 16 and train without DFA

python tools/train.py configs/fgd/fgdretinarx10164x4ddistillretinar50fpn2xcoco.py --resume-from workdirs/DFAfgdretinarx10164x4ddistillretinar50fpn2xcoco/epoch_16.pth

multi GPU

Step 1: train with DFA

bash tools/disttrain.sh configs/fgd/DFAfgdretinarx10164x4ddistillretinar50fpn2x_coco.py 8

Step 2: resume from epoch 16 and train without DFA

bash tools/disttrain.sh configs/fgd/fgdretinarx10164x4ddistillretinar50fpn2xcoco.py 8 --resume-from workdirs/DFAfgdretinarx10164x4ddistillretinar50fpn2xcoco/epoch16.pth

```

Test

```bash

single GPU

python tools/test.py configs/fgd/DFAfgdretinarx10164x4ddistillretinar50fpn2xcoco.py $PATH_CHECKPOINT --eval bbox

multi GPU

bash tools/disttest.sh configs/fgd/DFAfgdretinarx10164x4ddistillretinar50fpn2xcoco.py $PATHCHECKPOINT 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.

Owner

  • Login: JWLiang007
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - name: "MMDetection Contributors"
title: "OpenMMLab Detection Toolbox and Benchmark"
date-released: 2018-08-22
url: "https://github.com/open-mmlab/mmdetection"
license: Apache-2.0

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Dependencies

.github/workflows/build.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • codecov/codecov-action v1.0.10 composite
  • codecov/codecov-action v2 composite
.github/workflows/build_pat.yml actions
  • actions/checkout v2 composite
.github/workflows/deploy.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/lint.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
docker/Dockerfile docker
  • pytorch/pytorch ${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel build
docker/serve/Dockerfile docker
  • pytorch/pytorch ${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel build
requirements/albu.txt pypi
  • albumentations >=0.3.2
requirements/build.txt pypi
  • cython *
  • numpy *
requirements/docs.txt pypi
  • docutils ==0.16.0
  • myst-parser *
  • sphinx ==4.0.2
  • sphinx-copybutton *
  • sphinx_markdown_tables *
  • sphinx_rtd_theme ==0.5.2
requirements/mminstall.txt pypi
  • mmcv-full >=1.3.17
requirements/optional.txt pypi
  • cityscapesscripts *
  • imagecorruptions *
  • scipy *
  • sklearn *
  • timm *
requirements/readthedocs.txt pypi
  • mmcv *
  • torch *
  • torchvision *
requirements/runtime.txt pypi
  • matplotlib *
  • numpy *
  • pycocotools *
  • six *
  • terminaltables *
requirements/tests.txt pypi
  • asynctest * test
  • codecov * test
  • flake8 * test
  • interrogate * test
  • isort ==4.3.21 test
  • kwarray * test
  • onnx ==1.7.0 test
  • onnxruntime >=1.8.0 test
  • protobuf <=3.20.1 test
  • pytest * test
  • ubelt * test
  • xdoctest >=0.10.0 test
  • yapf * test
requirements.txt pypi
setup.py pypi