# High-Performance and Lightweight AI Model for Robot Vacuum Cleaners with Low Bitwidth Strong Non-Uniform Quantization

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Related Work

#### 2.1. State-of-the-Art AI Models

#### 2.2. Traditional Uniform Weight Quantization

## 3. Proposed AI Models with Non-Uniform Weight Quantization and Downsized Input

#### 3.1. Low-Bitwidth Strong Non-Uniform Weight Quantization

#### 3.2. Input Image Size Adjustment

## 4. Experimental Discussion

#### 4.1. Dataset Preparation and Experimental Setup

#### 4.2. Results of Low-Bitwidth Uniform Quantization

#### 4.3. Results of Low-Bitwidth Strong Non-Uniform Quantization

#### 4.4. Comprehensive Results Comparison

## 5. Conclusions and Future Works

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## References

- Singh, R.; Gill, S. Edge AI: A survey. Internet Things Cyber-Phys. Syst.
**2023**, 3, 71–92. [Google Scholar] - Jayaram, R.; Dandge, R. Optimizing Cleaning Efficiency of Robotic Vacuum Cleaner. TATA ELXSI Report. Available online: https://www.tataelxsi.com/ (accessed on 13 February 2022).
- Huang, Q.; Hsieh, C.; Hsieh, J.; Liu, C. Memory-Efficient AI Algorithm for Infant Sleeping Death Syndrome Detection in Smart Buildings. AI
**2021**, 2, 705–719. [Google Scholar] [CrossRef] - Huang, Q. Weight-Quantized SqueezeNet for Resource-Constrained Robot Vacuums for Indoor Obstacle Classification. AI
**2022**, 3, 180–193. [Google Scholar] [CrossRef] - Jacob, B.; Kligys, S.; Chen, B.; Zhu, M.; Tang, M.; Howard, A.; Kalenichenko, D. Quantization and Training of Neural Networks for Efficient Integer-arithmetic-only Inference. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 2704–2713. [Google Scholar]
- Esser, S.K.; McKinstry, J.L.; Bablani, D.; Appuswamy, R.; Modha, D.S. Learned Step Size Quantization. arXiv
**2019**, arXiv:1902.08153. [Google Scholar] - Nagel, M.; Fournarakis, M.; Amjad, R.A.; Bondarenko, Y.; Van Baalen, M.; Blankevoort, T. A White Paper on Neural Network Quantization. arXiv
**2021**, arXiv:2106.08295. [Google Scholar] - Tang, Z.; Luo, L.; Xie, B.; Zhu, Y.; Zhao, R.; Bi, L.; Lu, C. Automatic Sparse Connectivity Learning for Neural Networks. IEEE Trans. Neural Netw. Learn. Syst.
**2022**. [Google Scholar] [CrossRef] - Kaplan, C.; Bulbul, A. Goal Driven Network Pruning for Object Recognition. Pattern Recognit.
**2021**, 110, 107468. [Google Scholar] [CrossRef] - Han, S.; Mao, H.; Dally, W.J. Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding. arXiv
**2015**, arXiv:1510.00149. [Google Scholar] - Frankle, J.; Carbin, M. The lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks. arXiv
**2018**, arXiv:1803.03635. [Google Scholar] - Zhu, M.; Gupta, S. To Prune, or not to Prune: Exploring the Efficacy of Pruning for Model Compression. arXiv
**2017**, arXiv:1710.01878. [Google Scholar] - Zheng, J.; Lu, C.; Hao, C.; Chen, D.; Guo, D. Improving the Generalization Ability of Deep Neural Networks for Cross-Domain Visual Recognition. IEEE Trans. Cogn. Dev. Syst.
**2020**, 13, 607–620. [Google Scholar] [CrossRef] - Bu, X.; Peng, J.; Yan, J.; Tan, T.; Zhang, Z. Gaia: A Transfer Learning System of Object Detection that Fits Your Needs. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Nashville, TN, USA, 20–25 June 2021; pp. 274–283. [Google Scholar]
- Rukundo, O. Effects of Image Size on Deep Learning. Electronics
**2023**, 12, 985. [Google Scholar] [CrossRef] - Talebi, H.; Milanfar, P. Learning to Resize Images for Computer Vision Tasks. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Nashville, TN, USA, 20–25 June 2021; pp. 497–506. [Google Scholar]
- Iandola, F.; Han, S.; Moskewicz, M.; Ashraf, K.; Dally, W.; Keutzer, K. SqueezeNet: AlexNet-Level Accuracy with 50× Fewer Parameters and <0.5 MB Model Size. arXiv
**2016**, arXiv:1602.07360. [Google Scholar] - Nagel, M.; Baalen, M.V.; Blankevoort, T.; Welling, M. Data-free Quantization Through Weight Equalization and Bias Correction. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019; pp. 1325–1334. [Google Scholar]
- Krishnamoorthi, R. Quantizing Deep Convolutional Networks for Efficient Inference: A Whitepaper. arXiv
**2018**, arXiv:1806.08342. [Google Scholar] - Li, Y.; Dong, X.; Wang, W. Additive Powers-of-two Quantization: An Efficient Non-uniform Discretization for Neural Networks. arXiv
**2019**, arXiv:1909.13144. [Google Scholar] - Bai, J.; Lian, S.; Liu, Z.; Wang, K.; Liu, D. Deep Learning Based Robot for Automatically Picking up Garbage on the Grass. IEEE Trans. Consum. Electron.
**2018**, 64, 382–389. [Google Scholar] [CrossRef] [Green Version] - Yin, J.; Apuroop, K.G.S.; Tamilselvam, Y.K.; Mohan, R.E.; Ramalingam, B.; Le, A.V. Table Cleaning Task by Human Support Robot Using Deep Learning Technique. Sensors
**2020**, 20, 1698. [Google Scholar] [CrossRef] [Green Version] - Teng, T.; Veerajagadheswar, P.; Ramalingam, B.; Yin, J.; Mohan, R.; Gomez, F. Vision Based Wall Following Framework: A Case Study with HSR Robot for Cleaning Application. Sensors
**2020**, 20, 3298. [Google Scholar] - Ramalingam, B.; Lakshmanan, A.K.; Ilyas, M.; Le, A.V.; Elara, M.R. Cascaded Machine-Learning Technique for Debris Classification in Floor-Cleaning Robot Application. Appl. Sci.
**2018**, 8, 2649. [Google Scholar] [CrossRef] [Green Version] - Bao, L.; Lv, C. Ecovacs Robotics: The AI Robotic Vacuum Cleaner Powered by TensorFlow. 2020. Available online: https://blog.tensorflow.org/2020/01/ecovacs-robotics-ai-robotic-vacuum.html (accessed on 13 February 2022).
- Howard, A.; Zhu, M.; Chen, B.; Kalenichenko, D.; Wang, W.; Weyand, T.; Andreetto, M.; Adam, H. MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. arXiv
**2017**, arXiv:1704.04861. [Google Scholar] - Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L. MobileNetV2: Inverted Residuals and Linear bottlenecks. In Proceedings of the IEEE Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 4510–4520. [Google Scholar]
- STM32F7 Series. Available online: www.st.com/en/microcontrollers-microprocessors/stm32f7-series.html (accessed on 1 July 2023).
- Przewlocka-Rus, D.; Sarwar, S.S.; Sumbul, H.E.; Li, Y.; Salvo, B.D. Power-of-two Quantization for Low Bitwidth and Hardware Compliant Neural Networks. arXiv
**2022**, arXiv:2203.05025. [Google Scholar] - Kulkarni, U.; Hosamani, A.S.; Masur, A.S.; Keutzer, K. A Survey on Quantization Methods for Optimization of Deep Neural Networks. In Proceedings of the 2022 International Conference on Automation, Computing and Renewable Systems (ICACRS), Pudukkottai, India, 13–15 December 2022; pp. 827–834. [Google Scholar]
- Lee, E.; Hwang, Y. Layer-wise Network Compression Using Gaussian Mixture Model. Electronics
**2021**, 10, 72. [Google Scholar] [CrossRef]

**Figure 3.**(

**a**) Traditional AI model training process (forward pass for one network layer) without weight quantization [21,22,23,24,25], (

**b**) AI model training process (forward pass for one network layer) with 8-bit uniform quantization [4], and (

**c**) AI model training process (forward pass for one network layer) with proposed low-bitwidth non-uniform quantization.

**Figure 5.**Classification performance when uniform quantization is performed to SqueezeNet model for input figure size of 256 × 256 × 3.

**Figure 7.**Classification performance when uniform quantization is performed to SqueezeNet model for input figu size of 128 × 128 × 3.

**Figure 8.**Classification performance when uniform quantization is performed to SqueezeNet model for input figure size of 64 × 64 × 3.

**Figure 9.**Classification performance when non-uniform quantization is performed to SqueezeNet model and the input image size is 256 × 256 × 3.

**Figure 10.**Classification performance when non-uniform quantization is performed to SqueezeNet model and the input image size is 128 × 128 × 3.

**Figure 11.**Classification performance when non-uniform quantization is performed to SqueezeNet model and the input image size is 64 × 64 × 3.

**Figure 12.**Validation accuracy of the SqueezeNet model with the input image size of 128 × 128 × 3 and floating-point weights (no quantization).

**Figure 13.**Validation accuracy of the SqueezeNet model with the input image size of 128 × 128 × 3 and 4-bit power-of-3 quantization. The weight elements include: $-1,-0.333,-0.111,-0.037$, 0, 0.037, 0.111, 0.333, and 1.

**Figure 14.**Weight distribution plots of SqueezeNet with the training image size of 128 × 128 × 3 and floating-point weights (no quantization).

**Figure 15.**Weight distribution plots of SqueezeNet with the training image size of 128 × 128 × 3 and 4-bit power-of-3 quantization. The weight elements include: $-1,-0.333,-0.111,-0.037$, 0, 0.037, 0.111, 0.333, and 1.

**Figure 16.**Performance comparison of test classification accuracy vs. memory footprint between this work and existing state-of-the-art works in the literature.

Bit Weights | The Number of Weight Elements |
---|---|

5 bits | 31 |

4 bits | 15 |

3 bits | 7 |

2 bits | 3 |

Non-Uniform Quantization Option | Weight Elements |
---|---|

power-of-2 | $(-1,-0.5,-0.25,-0.125,\cdots ,0,\cdots ,0.125,0.25,0.5,1)$ |

power-of-3 | $(-1,-0.33,-0.11,\cdots ,0,\cdots ,0.11,0.33,1)$ |

power-of-4 | $(-1,-0.25,-0.0625,\cdots ,0,\cdots ,0.0625,0.25,1)$ |

power-of-5 | $(-1,-0.2,-0.04,-0.008,\cdots ,0,\cdots ,0.008,0.04,0.2,1)$ |

power-of-6 | $(-1,-0.167,-0.028,\cdots ,0,\cdots ,0.028,0.167,1)$ |

**Table 3.**Number of trainable parameters, and number of multiplier–adder operation usage for different input image sizes.

Memory Usage (MB) | 256 × 256 × 3 | 128 × 128 × 3 | 64 × 64 × 3 |
---|---|---|---|

trainable parameters | 60,230 | 15,462 | 4070 |

multiplier-adder operation | 18,000 | 4000 | 1000 |

Memory Usage (MB) | 256 × 256 × 3 | 128 × 128 × 3 | 64 × 64 × 3 |
---|---|---|---|

Input size | 0.75 | 0.19 | 0.05 |

Forward/backward pass size | 14.53 | 1.82 | 0.23 |

Parameter size | 0.23 | 0.06 | 0.02 |

Estimated total size | 15.51 | 2.07 | 0.29 |

**Table 5.**Examples of indoor cleanable litters and non-cleanable obstacles in our dataset [4].

Cleanable | Non-Cleanable |
---|---|

rice, sunflower seed shell, soybean, red bean | power cord, key chain, shoe, sock, rock |

millet, cat litters, cat food, dog food | pet feces, kids toy, oil bottle, power strip |

Accuracy @ Memory | 256 × 256 × 3 | 128 × 128 × 3 | 64 × 64 × 3 |
---|---|---|---|

5-bit | 93.62% @ 9.69 MB | 90.93% @ 1.29 MB | 77.63 % @ 0.18 MB |

4-bit | 93.34% @ 7.76 MB | 90.03% @ 1.04 MB | 77.50 % @ 0.15 MB |

3-bit | 91.62% @ 5.82 MB | 89.44% @ 0.78 MB | 75.09 % @ 0.11 MB |

2-bit | 67.18% @ 3.88 MB | 86.35% @ 0.52 MB | 73.19 % @ 0.07 MB |

Accuracy @ Memory | 256 × 256 × 3 | 128 × 128 × 3 | 64 × 64 × 3 |
---|---|---|---|

5-bit | 93.36% @ 9.69 MB | 90.77% @ 1.29 MB | 77.64% @ 0.18 MB |

4-bit | 93.07% @ 7.76 MB | 90.51% @ 1.04 MB | 77.43% @ 0.15 MB |

3-bit | 92.87% @ 5.82 MB | 90.28% @ 0.78 MB | 77.21% @ 0.11 MB |

2-bit | 91.03% @ 3.88 MB | 87.92% @ 0.52 MB | 76.80% @ 0.07 MB |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Huang, Q.; Tang, Z.
High-Performance and Lightweight AI Model for Robot Vacuum Cleaners with Low Bitwidth Strong Non-Uniform Quantization. *AI* **2023**, *4*, 531-550.
https://doi.org/10.3390/ai4030029

**AMA Style**

Huang Q, Tang Z.
High-Performance and Lightweight AI Model for Robot Vacuum Cleaners with Low Bitwidth Strong Non-Uniform Quantization. *AI*. 2023; 4(3):531-550.
https://doi.org/10.3390/ai4030029

**Chicago/Turabian Style**

Huang, Qian, and Zhimin Tang.
2023. "High-Performance and Lightweight AI Model for Robot Vacuum Cleaners with Low Bitwidth Strong Non-Uniform Quantization" *AI* 4, no. 3: 531-550.
https://doi.org/10.3390/ai4030029