|
|
--- |
|
|
license: mit |
|
|
datasets: |
|
|
- uoft-cs/cifar10 |
|
|
- uoft-cs/cifar100 |
|
|
- ILSVRC/imagenet-1k |
|
|
language: |
|
|
- en |
|
|
metrics: |
|
|
- accuracy |
|
|
base_model: |
|
|
- ReActNet |
|
|
--- |
|
|
|
|
|
<div align="center"> |
|
|
|
|
|
<h1>A&B BNN: Add&Bit-Operation-Only Hardware-Friendly Binary Neural Network</h1> |
|
|
|
|
|
[](https://arxiv.org/abs/2403.03739) |
|
|
[](https://cvpr.thecvf.com/virtual/2024/poster/29447) |
|
|
[](https://scholar.google.com/scholar?cluster=9219398500921383941) |
|
|
[](https://xploreqa.ieee.org/document/10656026) |
|
|
[](https://huggingface.co/papers/2403.03739) |
|
|
|
|
|
[](https://github.com/Ruichen0424/AB-BNN) |
|
|
[](https://youtu.be/L8cWTetcU2M?si=V_fH1YXVKhlaEdf4) |
|
|
[](https://www.bilibili.com/video/BV1PM4m1S7T1) |
|
|
|
|
|
</div> |
|
|
|
|
|
## π Introduction |
|
|
|
|
|
This repository contains the **pre-trained weights** for the paper **"A&B BNN: Add&Bit-Operation-Only Hardware-Friendly Binary Neural Network"**, published in **CVPR 2024**. |
|
|
|
|
|
**A&B BNN** proposes to directly remove part of the multiplication operations in a traditional BNN and replace the rest with an equal number of bit operations. It introduces the mask layer and the quantized RPReLU structure based on the normalizer-free network architecture. |
|
|
|
|
|
 |
|
|
|
|
|
### β¨ Key Highlights |
|
|
* **Hardware-Friendly**: Removes multiplication operations, replacing them with bit operations. |
|
|
* **Competitive Performance**: Achieves **92.30%**, **69.35%**, and **66.89%** on CIFAR-10, CIFAR-100, and ImageNet respectively. |
|
|
* **Innovative Structures**: Introduces mask layer and quantized RPReLU. |
|
|
|
|
|
## π Model Zoo & Results |
|
|
|
|
|
We provide pre-trained models for **CIFAR-10**, **CIFAR-100**, and **ImageNet**. You can download the `.h5` files directly from the [**Files and versions**](https://huggingface.co/Ruichen0424/AB-BNN/tree/main/models) tab in this repository. |
|
|
|
|
|
<table border="1"> |
|
|
<tr> |
|
|
<th>Dataset</th> |
|
|
<th align="center">Structure</th> |
|
|
<th align="center"># Params</th> |
|
|
<th align="center">Top-1 Acc</th> |
|
|
</tr> |
|
|
<!-- CIFAR10 --> |
|
|
<tr> |
|
|
<td rowspan="2" align="center" style="vertical-align: middle;"><strong>CIFAR10</strong></td> |
|
|
<td align="center" style="vertical-align: middle;">ReActNet-18</td> |
|
|
<td align="center" style="vertical-align: middle;">11.18 M</td> |
|
|
<td align="center" style="vertical-align: middle;">91.94%</td> |
|
|
</tr> |
|
|
<tr> |
|
|
<td align="center" style="vertical-align: middle;">ReActNet-A</td> |
|
|
<td align="center" style="vertical-align: middle;">28.32 M</td> |
|
|
<td align="center" style="vertical-align: middle;">89.44%</td> |
|
|
</tr> |
|
|
<!-- CIFAR100 --> |
|
|
<tr> |
|
|
<td rowspan="2" align="center" style="vertical-align: middle;"><strong>CIFAR100</strong></td> |
|
|
<td align="center" style="vertical-align: middle;">ReActNet-18</td> |
|
|
<td align="center" style="vertical-align: middle;">11.23 M</td> |
|
|
<td align="center" style="vertical-align: middle;">69.35%</td> |
|
|
</tr> |
|
|
<tr> |
|
|
<td align="center" style="vertical-align: middle;">ReActNet-A</td> |
|
|
<td align="center" style="vertical-align: middle;">28.41 M</td> |
|
|
<td align="center" style="vertical-align: middle;">63.23%</td> |
|
|
</tr> |
|
|
<!-- ImageNet --> |
|
|
<tr> |
|
|
<td rowspan="3" align="center" style="vertical-align: middle;"><strong>ImageNet</strong></td> |
|
|
<td align="center" style="vertical-align: middle;">ReActNet-18</td> |
|
|
<td align="center" style="vertical-align: middle;">11.70 M</td> |
|
|
<td align="center" style="vertical-align: middle;">61.39%</td> |
|
|
</tr> |
|
|
<tr> |
|
|
<td align="center" style="vertical-align: middle;">ReActNet-34</td> |
|
|
<td align="center" style="vertical-align: middle;">21.82 M</td> |
|
|
<td align="center" style="vertical-align: middle;">65.19%</td> |
|
|
</tr> |
|
|
<tr> |
|
|
<td align="center" style="vertical-align: middle;">ReActNet-A</td> |
|
|
<td align="center" style="vertical-align: middle;">29.33 M</td> |
|
|
<td align="center" style="vertical-align: middle;">66.89%</td> |
|
|
</tr> |
|
|
</table> |
|
|
|
|
|
## π» Usage |
|
|
|
|
|
This repository hosts the **model weights only**. |
|
|
|
|
|
For the **training scripts**, **inference codes**, and detailed usage instructions, please refer to our official GitHub repository. |
|
|
|
|
|
[](https://github.com/Ruichen0424/AB-BNN) |
|
|
|
|
|
## π Citation |
|
|
|
|
|
If you find our code useful for your research, please consider citing: |
|
|
|
|
|
```bibtex |
|
|
@inproceedings{ma2024b, |
|
|
title={A\&B BNN: Add\&Bit-Operation-Only Hardware-Friendly Binary Neural Network}, |
|
|
author={Ma, Ruichen and Qiao, Guanchao and Liu, Yian and Meng, Liwei and Ning, Ning and Liu, Yang and Hu, Shaogang}, |
|
|
booktitle={2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, |
|
|
pages={5704--5713}, |
|
|
year={2024}, |
|
|
organization={IEEE} |
|
|
} |
|
|
``` |
|
|
|