Анализ производительности вывода моделей глубокого обучения на плате Banana Pi BPI-F3 на примере задачи классификации изображений

Бесплатный доступ

В работе выполняется анализ производительности вывода известных нейросетевых моделей ResNet-50 и MobileNetV2, обеспечивающих решение задачи классификации изображений, на плате Banana Pi BPI-F3, которая построена на базе архитектуры RISC-V. Вывод запускается средствами доступных фреймворков: PyTorch, TensorFlow Lite, Apache TVM и ExecuTorch. Предварительно модели конвертируются в формат каждого целевого фреймворка. Выполняется проверка корректности решения задачи с использованием полученных нейронных сетей. Демонстрируется, что показатели качества классификации изображений для этих моделей хорошо соотносятся с опубликованными значениями. Далее выполняется подбор оптимальных параметров запуска вывода для каждого фреймворка и модели. Сравнительный анализ производительности вывода показывает, что ExecuTorch (с XNNPACK-бэкендом) для обеих моделей демонстрирует лучшие результаты. Для модели ResNet-50 показатель количества кадров, обрабатываемых за секунду (Frames per Second, FPS), меняется от 2.649 до 3.339 fps при оптимальных параметрах запуска в зависимости от размера входного набора данных, обрабатываемого за один прямой проход по сети, для MobileNetV2 — от 11.26 до 29.96 fps. TensorFlow Lite уступает ExecuTorch в среднем в ~ 2.1 раза. PyTorch и Apache TVM демонстрируют более низкие показатели производительности. Предположительно это связано с тем, что вывод в этих фреймворках не в полной мере оптимизирован для процессоров архитектуры RISC-V.

Еще

Глубокое обучение, классификация изображений, производительность вывода, PyTorch, TensorFlow Lite, Apache TVM, ExecuTorch, Banana Pi BPI-F3, RISC-V

Короткий адрес: https://sciup.org/147252612

IDR: 147252612   |   УДК: 004.032.26   |   DOI: 10.14529/cmse250403

Performance Analysis of Deep Learning Inference on the Banana Pi BPI-F3 Board Using the Image Classification Problem as an Example

The paper analyzes the inference performance of the well-known neural networks ResNet-50 and MobileNetV2, which provide a solution for the problem of image classification, on the Banana Pi BPI-F3 board, which is built on the RISC-V architecture. The inference is launched by available frameworks: PyTorch, TensorFlow Lite, Apache TVM and ExecuTorch. The models are converted to the format of each target framework. The correctness of the problem solving is checked using the obtained neural networks. It is demonstrated that the accuracy indicators of image classification using these models correlate well with the published ones. Then, the optimal parameters for launching the inference for each framework and model are selected. A comparative analysis of the inference performance shows that ExecuTorch demonstrates the best results for both models. For the ResNet-50 model, the number of frames processed per second (FPS) varies from 2.649 to 3.339 fps with optimal parameters depending on the batch size of images processed in one forward pass through the network, for MobileNetV2 – from 11.26 to 29.96 fps. TensorFlow Lite is inferior to ExecuTorch by an average of ~ 2.1 times. PyTorch and Apache TVM demonstrate lower performance indicators. Probably, this is due to the fact that they are not fully optimized for the RISC-V architecture.

Еще