Cargando…
Rapid Convolutional Neural Networks for Gram-Stained Image Classification at Inference Time on Mobile Devices: Empirical Study from Transfer Learning to Optimization
Despite the emergence of mobile health and the success of deep learning (DL), deploying production-ready DL models to resource-limited devices remains challenging. Especially, during inference time, the speed of DL models becomes relevant. We aimed to accelerate inference time for Gram-stained analy...
Autores principales: | , , , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
MDPI
2022
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9688012/ https://www.ncbi.nlm.nih.gov/pubmed/36359328 http://dx.doi.org/10.3390/biomedicines10112808 |
_version_ | 1784836159085477888 |
---|---|
author | Kim, Hee E. Maros, Mate E. Siegel, Fabian Ganslandt, Thomas |
author_facet | Kim, Hee E. Maros, Mate E. Siegel, Fabian Ganslandt, Thomas |
author_sort | Kim, Hee E. |
collection | PubMed |
description | Despite the emergence of mobile health and the success of deep learning (DL), deploying production-ready DL models to resource-limited devices remains challenging. Especially, during inference time, the speed of DL models becomes relevant. We aimed to accelerate inference time for Gram-stained analysis, which is a tedious and manual task involving microorganism detection on whole slide images. Three DL models were optimized in three steps: transfer learning, pruning and quantization and then evaluated on two Android smartphones. Most convolutional layers (≥80%) had to be retrained for adaptation to the Gram-stained classification task. The combination of pruning and quantization demonstrated its utility to reduce the model size and inference time without compromising model quality. Pruning mainly contributed to model size reduction by 15×, while quantization reduced inference time by 3× and decreased model size by 4×. The combination of two reduced the baseline model by an overall factor of 46×. Optimized models were smaller than 6 MB and were able to process one image in <0.6 s on a Galaxy S10. Our findings demonstrate that methods for model compression are highly relevant for the successful deployment of DL solutions to resource-limited devices. |
format | Online Article Text |
id | pubmed-9688012 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2022 |
publisher | MDPI |
record_format | MEDLINE/PubMed |
spelling | pubmed-96880122022-11-25 Rapid Convolutional Neural Networks for Gram-Stained Image Classification at Inference Time on Mobile Devices: Empirical Study from Transfer Learning to Optimization Kim, Hee E. Maros, Mate E. Siegel, Fabian Ganslandt, Thomas Biomedicines Article Despite the emergence of mobile health and the success of deep learning (DL), deploying production-ready DL models to resource-limited devices remains challenging. Especially, during inference time, the speed of DL models becomes relevant. We aimed to accelerate inference time for Gram-stained analysis, which is a tedious and manual task involving microorganism detection on whole slide images. Three DL models were optimized in three steps: transfer learning, pruning and quantization and then evaluated on two Android smartphones. Most convolutional layers (≥80%) had to be retrained for adaptation to the Gram-stained classification task. The combination of pruning and quantization demonstrated its utility to reduce the model size and inference time without compromising model quality. Pruning mainly contributed to model size reduction by 15×, while quantization reduced inference time by 3× and decreased model size by 4×. The combination of two reduced the baseline model by an overall factor of 46×. Optimized models were smaller than 6 MB and were able to process one image in <0.6 s on a Galaxy S10. Our findings demonstrate that methods for model compression are highly relevant for the successful deployment of DL solutions to resource-limited devices. MDPI 2022-11-04 /pmc/articles/PMC9688012/ /pubmed/36359328 http://dx.doi.org/10.3390/biomedicines10112808 Text en © 2022 by the authors. https://creativecommons.org/licenses/by/4.0/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/). |
spellingShingle | Article Kim, Hee E. Maros, Mate E. Siegel, Fabian Ganslandt, Thomas Rapid Convolutional Neural Networks for Gram-Stained Image Classification at Inference Time on Mobile Devices: Empirical Study from Transfer Learning to Optimization |
title | Rapid Convolutional Neural Networks for Gram-Stained Image Classification at Inference Time on Mobile Devices: Empirical Study from Transfer Learning to Optimization |
title_full | Rapid Convolutional Neural Networks for Gram-Stained Image Classification at Inference Time on Mobile Devices: Empirical Study from Transfer Learning to Optimization |
title_fullStr | Rapid Convolutional Neural Networks for Gram-Stained Image Classification at Inference Time on Mobile Devices: Empirical Study from Transfer Learning to Optimization |
title_full_unstemmed | Rapid Convolutional Neural Networks for Gram-Stained Image Classification at Inference Time on Mobile Devices: Empirical Study from Transfer Learning to Optimization |
title_short | Rapid Convolutional Neural Networks for Gram-Stained Image Classification at Inference Time on Mobile Devices: Empirical Study from Transfer Learning to Optimization |
title_sort | rapid convolutional neural networks for gram-stained image classification at inference time on mobile devices: empirical study from transfer learning to optimization |
topic | Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9688012/ https://www.ncbi.nlm.nih.gov/pubmed/36359328 http://dx.doi.org/10.3390/biomedicines10112808 |
work_keys_str_mv | AT kimheee rapidconvolutionalneuralnetworksforgramstainedimageclassificationatinferencetimeonmobiledevicesempiricalstudyfromtransferlearningtooptimization AT marosmatee rapidconvolutionalneuralnetworksforgramstainedimageclassificationatinferencetimeonmobiledevicesempiricalstudyfromtransferlearningtooptimization AT siegelfabian rapidconvolutionalneuralnetworksforgramstainedimageclassificationatinferencetimeonmobiledevicesempiricalstudyfromtransferlearningtooptimization AT ganslandtthomas rapidconvolutionalneuralnetworksforgramstainedimageclassificationatinferencetimeonmobiledevicesempiricalstudyfromtransferlearningtooptimization |