Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What does EfficientNet-lite mean?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "what is the meaning of EfficientNet-lite", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "what does EfficientNet-lite mean" this article?

Overview

3.17 Google released an end-side version of EfficientNet-lite,EfficientNet simultaneously on GitHub and TFHub, running on TensorFlow Lite, optimized for end-side CPU, GPU and EdgeTPU. EfficientNet-lite provides five different versions (EfficientNet-lite0~4) that allow users to choose between latency, number of parameters and precision according to their application scenarios and resources.

EfficientNet-Lite4 is the version with the largest amount of computation, with an accuracy of 80.4% on top-1 on ImageNet, and can run on the CPU of Pixel 4 at the speed of 30ms/image. The relationship between EfficientNet-lite accuracy and delay and parameters is shown in the following figure. It can be seen that it has left MobileNet V2 ResNet 50 and Inception v4 models far behind.

Principle

EfficientNet-lite has made a series of optimizations:

Quantification. The speed of fixed-point operation is much faster than that of floating-point operation, and quantization is essential in the scene where the computing power of mobile devices is limited. However, the fixed-point number is used in quantization, which means that the range is much smaller than the floating-point number, so there must be a loss of accuracy. With the help of the post-training quantization process provided in TensorFlow Lite to quantify the model, the impact on the accuracy is reduced as much as possible. Through quantization, the size of the model is reduced to 1 to 4, and the reasoning speed is nearly 2 times higher.

Comparison of EfficientNet-lite0 floating point model float32 and int8 quantitative version in model size, accuracy and time delay:

Structure and operator optimization. Remove the squeeze-and-excitation structure because of current poor support on end-side devices.

Using Relu6 instead of swish activation function, swish activation complexity is high, and it has an adverse effect on quantization.

Stem and head modules are fixed when the model size is scaled down to reduce the size and calculation of the model after scaling.

Use

For users' personalized datasets, it is recommended to use TensorFlow Lite Model Maker and transfer learning on existing TensorFlow models. TensorFlow Lite Model Maker supports many model structures, including MobileNetV2 and all five versions of EfficientNet-Lite. The following is the code to classify flowers using EfficientNet-lite0, just five lines.

# Load your custom dataset

Data = ImageClassifierDataLoader.from_folder (flower_path)

Train_data, test_data = data.split (0.9) # Customize the pre-trained TensorFlow model

Model = image_classifier.create (train_data, model_spec=efficienetnet_lite0_spec) # Evaluate the model

Loss, accuracy = model.evaluate (test_data) # Export as TensorFlow Lite model.

Model.export ('image_classifier.tflite',' image_labels.txt')

By changing the model_spec parameters, you can try different models. After the model is established, you can build it as a mobile app and store your personalized model in the asset folder.

The above is all the contents of this article "what does EfficientNet-lite mean?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report