Binary Neural Network “A New Revolution in AI”?


If I get to explain the neural network to a Noob. I explain to them as,

A Neural Network is more like a Jigsaw puzzle. We try to combine these jigsaws eachother over tons of data. But the best part is we can change these pieces accordingly. These jigsaws are weights.

Now, If we take weights as Floating points we can change them over billions of possibilities like 12.2230 or 12.2245 etc. But in Binary Neural Network(BNN) we fix those weights to +1 and -1 only. Later in this blog, I will explain how BNN is 64 times **faster to that of the floating-point network. **This blog from Saurabh nicely explains the need for revolutionary Fast AI.

What is behind the BNN?

During the forward pass, BNNs drastically reduce memory size and accesses, and replace most arithmetic operations with bit-wise operations, which is expected to substantially improve power-efficiency. We convert floating weights to binarized weights using:


After converting weights to +1 and -1. This blog explains the computation of +1 a. s 1(set bit) and -1 as 0(unset bit).

Some Proof of concepts:

As BNNs have a very efficient forward pass, They can be used in real-time face detection/recognition using a deep learning system running on a pair of glasses. Billions of IoT devices, small mobile devices, etc. can become smart using BNNs only.

There are various SOTAs implementations that are available out there like ours Fiera. DABNN from JDAI-CV is the highly-optimized binary neural network inference framework for mobile platforms. On Google Pixel 1, DABNN is as 800%-2400% faster as BMXNet. We can deploy BNNs on non-Android ARM devices through onnx2bnn. This is the documentation about model conversion.

There also have been great papers published to get the good State of the art accuracy for BNN based architectures.

Comparison of accuracies on the ImageNet datasetComparison of accuracies on the ImageNet dataset

On combining the above two i.e. DABNN and Methodology we can get more virtuous results. One of the classical examples we have got is Tiny YOLOV4 XNOR. It uses a optimized XNOR operation to perform object detection. You can use this to build traffic monitoring, smart city, danger detection etc use cases. At nayan we use this to process videos fast on edge. We can also use this technique with Pruning which reduces the network complexity by manyfolds. You can read more from here

p.s. Nayan is a platform that offers high precision services for traffic monitoring and road safety. Check out our website


© 2019 NAYAN All Rights Reserved