sibosutd / feature-distillation

Python implementation for paper: Feature Distillation: DNN-Oriented JPEG Compression Against Adversarial Examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feature-distillation

This repository implements DNN-Oriented JPEG compression introduced in the following paper

Feature Distillation: DNN-Oriented JPEG Compression Against Adversarial Examples

Introduction

DNN-Oriented JPEG Compression

Figure 1: Diagram of DNN-Oriented JPEG compression

Usage

python jpeg.py --image fig/lena.png --component dnn
usage: jpeg.py [-h] [--image IMAGE] [--component COMPONENT] [--factor FACTOR]
optional arguments:
  -h, --help            show this help message and exit
  --image IMAGE         image name
  --component COMPONENT
                        dnn-oriented or jpeg standard
  --factor FACTOR       compression factor

Results

Compare

Figure 2: Standard JPEG compression (Q = 50)

Compare

Figure 3: DNN-Oriented JPEG compression (Q = 50)

TODO

  • zigzag sorting
  • sorting by standard deviation
  • adversarial defense evaluation

Contribution

If you find a bug, feel free to create an issue.

Reference

About

Python implementation for paper: Feature Distillation: DNN-Oriented JPEG Compression Against Adversarial Examples


Languages

Language:Python 100.0%