Robust and Accurate Object Detection via Self-Knowledge Distillation

Related tags

Deep Learningudfa
Overview

Robust and Accurate Object Detection via Self-Knowledge Distillation

paper:https://arxiv.org/abs/2111.07239

Environments

  • Python 3.7
  • Cuda 10.1
  • Prepare dependency

Notes: We revise MMCV to adapt adversarial algorithms. Therefore we suggest that you prepare environments strictly as follows:

conda create -n udfa python=3.7
conda activate udfa
sh prepare_env.sh

Prepare datasets

  • VOC0712, download from http://host.robots.ox.ac.uk/pascal/VOC/, and place it under data directory

  • COCO2017, download from https://cocodataset.org/#download, and place it under data directory

  • The structure of datasets is shown as follows:

    structure of dataset

Train

VOC dataset

  • Generate GFLV2-R34 pretrained detector (served as teacher) on PASCAL_VOC 0712:

    python -m torch.distributed.launch --nproc_per_node=4  train.py --launcher pytorch --config configs/gflv2/gflv2_r34_fpn_voc_std.py 
    cd work_dirs/gflv2_r34_fpn_voc_std
    cp epoch_12.pth ../../weights/gflv2_r34_voc_pre.pth
    
  • Training GFLV2-R34 using udfa on PASCAL_VOC 0712:

    python -m torch.distributed.launch --nproc_per_node=4  train.py --launcher pytorch --config configs/gflv2/gflv2_r34_fpn_voc_kdss.py --load-from weights/gflv2_r34_voc_pre.pth
    
  • Training GFLV2-R34 using udfa with advprop on PASCAL_VOC 0712:

    python -m torch.distributed.launch --nproc_per_node=4  train.py --launcher pytorch --config configs/gflv2/gflv2_r34_fpn_voc_kdss1.py --load-from weights/gflv2_r34_voc_pre.pth
    
  • Training GFLV2-R34 using Det-AdvProp on PASCAL_VOC 0712:

    python -m torch.distributed.launch --nproc_per_node=4  train.py --launcher pytorch --config configs/gflv2/gflv2_r34_fpn_voc_mixbn.py --load-from weights/gflv2_r34_voc_pre.pth
    

COCO dataset

  • Generate GFLV2-R34 pretrained detector (served as teacher) on COCO:

    python -m torch.distributed.launch --nproc_per_node=4  train.py --launcher pytorch --config configs/gflv2/gflv2_r34_fpn_coco_std.py 
    cd work_dirs/gflv2_r34_fpn_coco_std
    cp epoch_12.pth ../../weights/gflv2_r34_coco_pre.pth
    
  • Training GFLV2-R34 using udfa on COCO:

    python -m torch.distributed.launch --nproc_per_node=4  train.py --launcher pytorch --config configs/gflv2/gflv2_r34_fpn_coco_kdss.py --load-from weights/gflv2_r34_coco_pre.pth
    
  • Training GFLV2-R34 using Det-AdvProp on COCO:

    python -m torch.distributed.launch --nproc_per_node=4  train.py --launcher pytorch --config configs/gflv2/gflv2_r34_fpn_coco_mixbn.py --load-from weights/gflv2_r34_coco_pre.pth
    

Test

  • Evlauate the clean AP or adversarial robustness on PASCAL_VOC 2007 test set:

    python -m torch.distributed.launch --nproc_per_node=4 test.py --launcher pytorch --configs/gflv2/gflv2_r34_fpn_voc_std.py  --checkpoint weights/gflv2_r34_voc_pre.pth --num_steps 0 --step_size 2 --eval mAP
    
  • Evlauate the clean AP or adversarial robustness on COCO 2017val set:

    python -m torch.distributed.launch --nproc_per_node=4 test.py --launcher pytorch --configs/gflv2/gflv2_r34_fpn_coco_std.py  --checkpoint weights/gflv2_r34_coco_pre.pth --num_steps 0 --step_size 2 --eval bbox
    

Acknowledgement

Our project is based on ImageCorruptions, MMDetection and MMCV.

Owner
Weipeng Xu
Weipeng Xu
Transformers4Rec is a flexible and efficient library for sequential and session-based recommendation, available for both PyTorch and Tensorflow.

Transformers4Rec is a flexible and efficient library for sequential and session-based recommendation, available for both PyTorch and Tensorflow.

730 Jan 09, 2023
Official PyTorch implementation of the paper Image-Based CLIP-Guided Essence Transfer.

TargetCLIP- official pytorch implementation of the paper Image-Based CLIP-Guided Essence Transfer This repository finds a global direction in StyleGAN

Hila Chefer 221 Dec 13, 2022
Deep learning model for EEG artifact removal

DeepSeparator Introduction Electroencephalogram (EEG) recordings are often contaminated with artifacts. Various methods have been developed to elimina

23 Dec 21, 2022
TorchIO is a Medical image preprocessing and augmentation toolkit for deep learning. Part of the PyTorch Ecosystem.

Medical image preprocessing and augmentation toolkit for deep learning. Part of the PyTorch Ecosystem.

Fernando Pérez-García 1.6k Jan 06, 2023
This toolkit provides codes to download and pre-process the SLUE datasets, train the baseline models, and evaluate SLUE tasks.

slue-toolkit We introduce Spoken Language Understanding Evaluation (SLUE) benchmark. This toolkit provides codes to download and pre-process the SLUE

ASAPP Research 39 Sep 21, 2022
Exploit ILP to learn symmetry breaking constraints of ASP programs.

ILP Symmetry Breaking Overview This project aims to exploit inductive logic programming to lift symmetry breaking constraints of ASP programs. Given a

Research Group Production Systems 1 Apr 13, 2022
DCGAN-tensorflow - A tensorflow implementation of Deep Convolutional Generative Adversarial Networks

DCGAN in Tensorflow Tensorflow implementation of Deep Convolutional Generative Adversarial Networks which is a stabilize Generative Adversarial Networ

Taehoon Kim 7.1k Dec 29, 2022
PyTorch-Multi-Style-Transfer - Neural Style and MSG-Net

PyTorch-Style-Transfer This repo provides PyTorch Implementation of MSG-Net (ours) and Neural Style (Gatys et al. CVPR 2016), which has been included

Hang Zhang 906 Jan 04, 2023
P-Tuning v2: Prompt Tuning Can Be Comparable to Finetuning Universally Across Scales and Tasks

P-tuning v2 P-Tuning v2: Prompt Tuning Can Be Comparable to Finetuning Universally Across Scales and Tasks An optimized prompt tuning strategy achievi

THUDM 540 Dec 30, 2022
StarGAN-ZSVC: Unofficial PyTorch Implementation

This repository is an unofficial PyTorch implementation of StarGAN-ZSVC by Matthew Baas and Herman Kamper. This repository provides both model architectures and the code to inference or train them.

Jirayu Burapacheep 11 Aug 28, 2022
Trajectory Prediction with Graph-based Dual-scale Context Fusion

DSP: Trajectory Prediction with Graph-based Dual-scale Context Fusion Introduction This is the project page of the paper Lu Zhang, Peiliang Li, Jing C

HKUST Aerial Robotics Group 103 Jan 04, 2023
Anomaly detection analysis and labeling tool, specifically for multiple time series (one time series per category)

taganomaly Anomaly detection labeling tool, specifically for multiple time series (one time series per category). Taganomaly is a tool for creating la

Microsoft 272 Dec 17, 2022
Open-source Monocular Python HawkEye for Tennis

Tennis Tracking 🎾 Objectives Track the ball Detect court lines Detect the players To track the ball we used TrackNet - deep learning network for trac

ArtLabs 188 Jan 08, 2023
Implementation of ICCV21 paper: PnP-DETR: Towards Efficient Visual Analysis with Transformers

Implementation of ICCV 2021 paper: PnP-DETR: Towards Efficient Visual Analysis with Transformers arxiv This repository is based on detr Recently, DETR

twang 113 Dec 27, 2022
Narya API allows you track soccer player from camera inputs, and evaluate them with an Expected Discounted Goal (EDG) Agent

Narya The Narya API allows you track soccer player from camera inputs, and evaluate them with an Expected Discounted Goal (EDG) Agent. This repository

Paul Garnier 121 Dec 30, 2022
End-to-End Object Detection with Fully Convolutional Network

This project provides an implementation for "End-to-End Object Detection with Fully Convolutional Network" on PyTorch.

472 Dec 22, 2022
Probabilistic Tensor Decomposition of Neural Population Spiking Activity

Probabilistic Tensor Decomposition of Neural Population Spiking Activity Matlab (recommended) and Python (in developement) implementations of Soulat e

Hugo Soulat 6 Nov 30, 2022
Code for the paper "On the Power of Edge Independent Graph Models"

Edge Independent Graph Models Code for the paper: "On the Power of Edge Independent Graph Models" Sudhanshu Chanpuriya, Cameron Musco, Konstantinos So

Konstantinos Sotiropoulos 0 Oct 26, 2021
A foreign language learning aid using a neural network to predict probability of translating foreign words

Langy Langy is a reading-focused foreign language learning aid orientated towards young children. Reading is an activity that every child knows. It is

Shona Lowden 6 Nov 17, 2021
Rethinking Space-Time Networks with Improved Memory Coverage for Efficient Video Object Segmentation

STCN Rethinking Space-Time Networks with Improved Memory Coverage for Efficient Video Object Segmentation Ho Kei Cheng, Yu-Wing Tai, Chi-Keung Tang [a

Rex Cheng 456 Dec 12, 2022