Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
i-colbert committed Sep 13, 2023
1 parent ff901fb commit e6cfb34
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/brevitas_examples/super_resolution/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
# Integer-Quantized Super Resolution Experiments with Brevitas

This directory contains training scripts to demonstrate how to train integer-quantized super resolution models using [Brevitas](https://github.com/Xilinx/brevitas).
Code is also provided to demonstrate accumulator-aware quantization (A2Q) as proposed in our paper "[Quantized Neural Networks for Low-Precision Accumulation with Guaranteed Overflow Avoidance](https://arxiv.org/abs/2301.13376)".
This directory contains scripts demonstrating how to train integer-quantized super resolution models using [Brevitas](https://github.com/Xilinx/brevitas).
Code is also provided to demonstrate accumulator-aware quantization (A2Q) as proposed in our ICCV 2023 paper "[A2Q: Accumulator-Aware Quantization with Guaranteed Overflow Avoidance](https://arxiv.org/abs/2308.13504)".

## Experiments

All models are trained on the BSD300 dataset to upsample images by 2x.
Target images are center cropped to 512x512.
Target images are cropped to 512x512.
During training random cropping is applied, along with random vertical and horizontal flips.
During inference center cropping is applied.
Inputs are then downscaled by 2x and then used to train the model directly in the RGB space.
Note that this is a difference from many academic works that train only on the Y-channel in YCbCr format.

| Model Name | Upscale Factor | Weight quantization | Activation quantization | Peak Signal-to-Noise Ratio |
|-----------------------------|----------------|---------------------|-------------------------|----------------------------|
| [float_espcn_x2](https://github.com/Xilinx/brevitas/releases/download/super_res_r0/float_espcn_x2-2f3821e3.pth) | x2 | float32 | float32 | 30.37 |
| [quant_espcn_x2_w8a8_base](https://github.com/Xilinx/brevitas/releases/download/super_res_r0/quant_espcn_x2_w8a8_base-7d54e29c.pth) | x2 | int8 | (u)int8 | 30.16 |
| [quant_espcn_x2_w8a8_a2q_32b](https://github.com/Xilinx/brevitas/releases/download/super_res_r0/quant_espcn_x2_w8a8_a2q_32b-0b1f361d.pth) | x2 | int8 | (u)int8 | 30.80 |
| [quant_espcn_x2_w8a8_a2q_16b](https://github.com/Xilinx/brevitas/releases/download/super_res_r0/quant_espcn_x2_w8a8_a2q_16b-3c4acd35.pth) | x2 | int8 | (u)int8 | 29.38 |
| bicubic_interp | x2 | N/A | N/A | 28.71 |
| [float_espcn_x2]() | x2 | float32 | float32 | 31.03 |
||
| [quant_espcn_x2_w8a8_base]() | x2 | int8 | (u)int8 | 30.96 |
| [quant_espcn_x2_w8a8_a2q_32b]() | x2 | int8 | (u)int8 | 30.79 |
| [quant_espcn_x2_w8a8_a2q_16b]() | x2 | int8 | (u)int8 | 30.56 |
||
| [quant_espcn_x2_w4a4_base]() | x2 | int4 | (u)int4 | 30.30 |
| [quant_espcn_x2_w4a4_a2q_32b]() | x2 | int4 | (u)int4 | 30.27 |
| [quant_espcn_x2_w4a4_a2q_14b]() | x2 | int4 | (u)int4 | 30.24 |


## Train
Expand Down

0 comments on commit e6cfb34

Please sign in to comment.