--- license: mit datasets: - uoft-cs/cifar10 - uoft-cs/cifar100 - ILSVRC/imagenet-1k language: - en metrics: - accuracy base_model: - ReActNet ---

A&B BNN: Add&Bit-Operation-Only Hardware-Friendly Binary Neural Network

[![Paper](https://img.shields.io/badge/Arxiv-2403.03739-B31B1B.svg?style=flat-square)](https://arxiv.org/abs/2403.03739) [![CVPR 2024](https://img.shields.io/badge/CVPR%202024-Poster-4b44ce.svg?style=flat-square)](https://cvpr.thecvf.com/virtual/2024/poster/29447) [![Google Scholar](https://img.shields.io/badge/Google%20Scholar-Paper-4285F4?style=flat-square&logo=google-scholar&logoColor=white)](https://scholar.google.com/scholar?cluster=9219398500921383941) [![IEEE](https://img.shields.io/badge/IEEE-Paper-00629B?style=flat-square&logo=ieee&logoColor=white)](https://xploreqa.ieee.org/document/10656026) [![Hugging Face](https://img.shields.io/badge/Hugging%20Face-Paper-FFD21E?style=flat-square&logo=huggingface&logoColor=black)](https://huggingface.co/papers/2403.03739) [![GitHub](https://img.shields.io/badge/GitHub-Repository-black?logo=github)](https://github.com/Ruichen0424/AB-BNN) [![YouTube](https://img.shields.io/badge/YouTube-Video-FF0000?style=flat-square&logo=youtube&logoColor=white)](https://youtu.be/L8cWTetcU2M?si=V_fH1YXVKhlaEdf4) [![Bilibili](https://img.shields.io/badge/Bilibili-Video-FE7398?style=flat-square&logo=bilibili&logoColor=white)](https://www.bilibili.com/video/BV1PM4m1S7T1)
## 🚀 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. ![Poster](./assets/poster.png) ### ✨ 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.
Dataset Structure # Params Top-1 Acc
CIFAR10 ReActNet-18 11.18 M 91.94%
ReActNet-A 28.32 M 89.44%
CIFAR100 ReActNet-18 11.23 M 69.35%
ReActNet-A 28.41 M 63.23%
ImageNet ReActNet-18 11.70 M 61.39%
ReActNet-34 21.82 M 65.19%
ReActNet-A 29.33 M 66.89%
## 💻 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. [![GitHub](https://img.shields.io/badge/GitHub-Repository-black?logo=github)](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} } ```