EfficientNet v2

April 16, 2026 ยท View on GitHub

Use case : Image classification

Model description

EfficientNet v2 family is one of the best topologies for image classification. It has been obtained through neural architecture search with a special care given to training time and number of parameters reduction.

This family of networks comprises various subtypes: B0 (224x224), B1 (240x240), B2 (260x260), B3 (300x300), S (384x384) ranked by depth and width increasing order. There are also M, L, XL variants but too large to be executed efficiently on STM32N6.

All these networks are already available on https://www.tensorflow.org/api_docs/python/tf/keras/applications/ pre-trained on imagenet.

Network information

Network InformationValue
FrameworkTensorFlow Lite/ONNX quantizer
MParams type=B07.1 M
Quantizationint8
Provenancehttps://www.tensorflow.org/api_docs/python/tf/keras/applications/efficientnet_v2
Paperhttps://arxiv.org/pdf/2104.00298

The models are quantized using tensorflow lite converter or ONNX quantizer.

Network inputs / outputs

For an image resolution of NxM and P classes

Input ShapeDescription
(1, N, M, 3)Single NxM RGB image with UINT8 values between 0 and 255 for tflite
(1, 3, N, M)Single NxM RGB image with INT8 values between -128 and 127 for ONNX
Output ShapeDescription
(1, P)Per-class confidence for P classes in FLOAT32 for tflite
(1, P)Per-class confidence for P classes in FLOAT32 for ONNX
PlatformSupportedRecommended
STM32L0[][]
STM32L4[][]
STM32U5[][]
STM32H7[][]
STM32MP1[x][x]
STM32MP2[x][x]
STM32N6[x][x]

Performances

Metrics

  • Measures are done with default STM32Cube.AI configuration with enabled input / output allocated option.
  • fft stands for "full fine-tuning", meaning that the full model weights were initialized from a transfer learning pre-trained model, and all the layers were unfrozen during the training.

Reference NPU memory footprint on food101 and imagenet dataset (see Accuracy for details on dataset)

ModelDatasetFormatResolutionSeriesInternal RAM (KiB)External RAM (KiB)Weights Flash (KiB)STEdgeAI Core version
efficientnetv2b0_224_fft onnxfood101Int8224x224x3STM32N6722.750.06839.394.0.0
efficientnetv2b0_224_fft onnxfood101Int8/Int4224x224x3STM32N6722.750.04237.524.0.0
efficientnetv2b1_240_fft onnxfood101Int8240x240x3STM32N61118.650.08089.274.0.0
efficientnetv2b1_240_fft onnxfood101Int8/Int4240x240x3STM32N61118.650.04995.394.0.0
efficientnetv2b2_260_fft onnxfood101Int8260x260x3STM32N61233.20.010328.524.0.0
efficientnetv2b2_260_fft onnxfood101Int8/Int4260x260x3STM32N61233.20.06865.394.0.0
efficientnetv2s_384_fft onnxfood101Int8384x384x3STM32N62471.94172824262.344.0.0
efficientnetv2s_384_fft onnxfood101Int8/Int4384x384x3STM32N62471.94172814836.944.0.0
efficientnetv2b0_224 onnximagenetInt8224x224x3STM32N6722.750.07967.054.0.0
efficientnetv2b0_224 onnximagenetInt8/Int4224x224x3STM32N6722.750.05710.054.0.0
efficientnetv2b1_240 onnximagenetInt8240x240x3STM32N61118.650.09216.924.0.0
efficientnetv2b1_240 onnximagenetInt8/Int4240x240x3STM32N61118.650.06342.674.0.0
efficientnetv2b2_260 onnximagenetInt8260x260x3STM32N61233.20.011568.554.0.0
efficientnetv2b2_260 onnximagenetInt8/Int4260x260x3STM32N62233.20.08273.174.0.0
efficientnetv2b3_300 onnximagenetInt8300x300x3STM32N62051.650.016510.054.0.0
efficientnetv2b3_300 onnximagenetInt8/Int4300x300x3STM32N62051.650.010376.744.0.0
efficientnetv2s_384 onnximagenetInt8384x384x3STM32N627681728253904.0.0
efficientnetv2s_384 onnximagenetInt8/Int4384x384x3STM32N62768172815458.974.0.0

Reference NPU inference time on food101 and imagenet dataset (see Accuracy for details on dataset)

ModelDatasetFormatResolutionBoardExecution EngineInference time (ms)Inf / secSTEdgeAI Core version
efficientnetv2b0_224_fft onnxfood101Int8224x224x3STM32N6570-DKNPU/MCU33.1230.24.0.0
efficientnetv2b0_224_fft onnxfood101Int8/Int4224x224x3STM32N6570-DKNPU/MCU27.9735.74.0.0
efficientnetv2b1_240_fft onnxfood101Int8240x240x3STM32N6570-DKNPU/MCU44.0122.74.0.0
efficientnetv2b1_240_fft onnxfood101Int8/Int4240x240x3STM32N6570-DKNPU/MCU38.5125.94.0.0
efficientnetv2b2_260_fft onnxfood101Int8260x260x3STM32N6570-DKNPU/MCU57.4717.44.0.0
efficientnetv2b2_260_fft onnxfood101Int8/Int4260x260x3STM32N6570-DKNPU/MCU50.5119.84.0.0
efficientnetv2s_384_fft onnxfood101Int8384x384x3STM32N6570-DKNPU/MCU706.31.44.0.0
efficientnetv2s_384_fft onnxfood101Int8/Int4384x384x3STM32N6570-DKNPU/MCU696.491.44.0.0
efficientnetv2b0_224 onnximagenetInt8224x224x3STM32N6570-DKNPU/MCU36.127.74.0.0
efficientnetv2b0_224 onnximagenetInt8/Int4224x224x3STM32N6570-DKNPU/MCU30.5232.74.0.0
efficientnetv2b1_240 onnximagenetInt8240x240x3STM32N6570-DKNPU/MCU47.7220.94.0.0
efficientnetv2b1_240 onnximagenetInt8/Int4240x240x3STM32N6570-DKNPU/MCU41.2624.24.0.0
efficientnetv2b2_260 onnximagenetInt8260x260x3STM32N6570-DKNPU/MCU60.2916.64.0.0
efficientnetv2b2_260 onnximagenetInt8/Int4260x260x3STM32N6570-DKNPU/MCU50.9419.64.0.0
efficientnetv2b3_300 onnximagenetInt8300x300x3STM32N6570-DKNPU/MCU146.646.84.0.0
efficientnetv2b3_300 onnximagenetInt8/Int4300x300x3STM32N6570-DKNPU/MCU142.467.04.0.0
efficientnetv2s_384 onnximagenetInt8384x384x3STM32N6570-DKNPU/MCU475.352.14.0.0
efficientnetv2s_384 onnximagenetInt8/Int4384x384x3STM32N6570-DKNPU/MCU463.912.24.0.0

Accuracy with Food-101 dataset

Dataset details: link, Quotation[3] , Number of classes: 101 , Number of images: 101 000

ModelFormatResolutionTop 1 Accuracy
efficientnetv2b0_224_fftFloat224x224x386.59 %
efficientnetv2b0_224_fft onnxInt8224x224x385.98 %
efficientnetv2b0_224_fft onnxInt8/Int4224x224x384.47 %
efficientnetv2b1_240_fftFloat240x240x387.71 %
efficientnetv2b1_240_fft onnxInt8240x240x387.09 %
efficientnetv2b1_240_fft onnxInt8/Int4240x240x385.71 %
efficientnetv2b2_260_fftFloat260x260x388.67 %
efficientnetv2b2_260_fft onnxInt8260x260x388.44 %
efficientnetv2b2_260_fft onnxInt8/Int4260x260x387.24 %
efficientnetv2s_384_fftFloat384x384x391.69 %
efficientnetv2s_384_fft onnxInt8384x384x391.34 %
efficientnetv2s_384_fft onnxInt8/Int4384x384x389.87 %

Accuracy with imagenet

Dataset details: link, Quotation[4]. Number of classes: 1000. To perform the quantization, we calibrated the activations with a random subset of the training set. For the sake of simplicity, the accuracy reported here was estimated on the 10000 labelled images of the validation set.

ModelFormatResolutionTop 1 Accuracy
efficientnetv2b0_224Float224x224x375.18 %
efficientnetv2b0_224 onnxInt8224x224x373.75 %
efficientnetv2b0_224 onnxInt8/Int4224x224x373.38 %
efficientnetv2b1_240Float240x240x376.14 %
efficientnetv2b1_240 onnxInt8240x240x375.19 %
efficientnetv2b1_240 onnxInt8/Int4240x240x373.92 %
efficientnetv2b2_260Float260x260x376.58 %
efficientnetv2b2_260 onnxInt8260x260x376.14 %
efficientnetv2b2_260 onnxInt8/Int4260x260x374.71 %
efficientnetv2b3_300Float300x300x379.18 %
efficientnetv2b3_300 onnxInt8300x300x379.05 %
efficientnetv2b3_300 onnxInt8/Int4300x300x378.11 %
efficientnetv2s_384Float384x384x383.52 %
efficientnetv2s_384 onnxInt8384x384x383.07 %
efficientnetv2s_384 onnxInt8/Int4384x384x382.25 %

Retraining and Integration in a simple example:

Please refer to the stm32ai-modelzoo-services GitHub here

References

[1] "Tf_flowers : tensorflow datasets," TensorFlow. [Online]. Available: https://www.tensorflow.org/datasets/catalog/tf_flowers.

[2] J, ARUN PANDIAN; GOPAL, GEETHARAMANI (2019), "Data for: Identification of Plant Leaf Diseases Using a 9-layer Deep Convolutional Neural Network", Mendeley Data, V1, doi: 10.17632/tywbtsjrjv.1

[3] L. Bossard, M. Guillaumin, and L. Van Gool, "Food-101 -- Mining Discriminative Components with Random Forests." European Conference on Computer Vision, 2014.

[4] Olga Russakovsky*, Jia Deng*, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg and Li Fei-Fei. (* = equal contribution) imagenet Large Scale Visual Recognition Challenge.