Shifting capsule networks from the cloud to the deep edge
Autor(a) principal: | |
---|---|
Data de Publicação: | 2022 |
Outros Autores: | , , |
Tipo de documento: | Artigo |
Idioma: | eng |
Título da fonte: | Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
Texto Completo: | https://hdl.handle.net/1822/81556 |
Resumo: | Capsule networks (CapsNets) are an emerging trend in image processing. In contrast to a convolutional neural network, CapsNets are not vulnerable to object deformation, as the relative spatial information of the objects is preserved across the network. However, their complexity is mainly related to the capsule structure and the dynamic routing mechanism, which makes it almost unreasonable to deploy a CapsNet, in its original form, in a resource-constrained device powered by a small microcontroller (MCU). In an era where intelligence is rapidly shifting from the cloud to the edge, this high complexity imposes serious challenges to the adoption of CapsNets at the very edge. To tackle this issue, we present an API for the execution of quantized CapsNets in Arm Cortex-M and RISC-V MCUs. Our software kernels extend the Arm CMSIS-NN and RISC-V PULP-NN to support capsule operations with 8-bit integers as operands. Along with it, we propose a framework to perform post-training quantization of a CapsNet. Results show a reduction in memory footprint of almost 75%, with accuracy loss ranging from 0.07% to 0.18%. In terms of throughput, our Arm Cortex-M API enables the execution of primary capsule and capsule layers with medium-sized kernels in just 119.94 and 90.60 milliseconds (ms), respectively (STM32H755ZIT6U, Cortex-M7 @ 480 MHz). For the GAP-8 SoC (RISC-V RV32IMCXpulp @ 170 MHz), the latency drops to 7.02 and 38.03 ms, respectively. |
id |
RCAP_dca1a7ea0cfdb28d3eed0910189f9582 |
---|---|
oai_identifier_str |
oai:repositorium.sdum.uminho.pt:1822/81556 |
network_acronym_str |
RCAP |
network_name_str |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
repository_id_str |
7160 |
spelling |
Shifting capsule networks from the cloud to the deep edgeCapsule networksCapsule network quantizationEdgeCloudCMSIS-NNPULP-NNEngenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e InformáticaScience & TechnologyIndústria, inovação e infraestruturasCapsule networks (CapsNets) are an emerging trend in image processing. In contrast to a convolutional neural network, CapsNets are not vulnerable to object deformation, as the relative spatial information of the objects is preserved across the network. However, their complexity is mainly related to the capsule structure and the dynamic routing mechanism, which makes it almost unreasonable to deploy a CapsNet, in its original form, in a resource-constrained device powered by a small microcontroller (MCU). In an era where intelligence is rapidly shifting from the cloud to the edge, this high complexity imposes serious challenges to the adoption of CapsNets at the very edge. To tackle this issue, we present an API for the execution of quantized CapsNets in Arm Cortex-M and RISC-V MCUs. Our software kernels extend the Arm CMSIS-NN and RISC-V PULP-NN to support capsule operations with 8-bit integers as operands. Along with it, we propose a framework to perform post-training quantization of a CapsNet. Results show a reduction in memory footprint of almost 75%, with accuracy loss ranging from 0.07% to 0.18%. In terms of throughput, our Arm Cortex-M API enables the execution of primary capsule and capsule layers with medium-sized kernels in just 119.94 and 90.60 milliseconds (ms), respectively (STM32H755ZIT6U, Cortex-M7 @ 480 MHz). For the GAP-8 SoC (RISC-V RV32IMCXpulp @ 170 MHz), the latency drops to 7.02 and 38.03 ms, respectively.Miguel Costa is supported by FCT-Fundacao para a Ciencia e Tecnologia (grant SFRH/BD/146780/2019). This work has been also supported by FCT-Fundacao para a Ciencia e Tecnologia within the R&D Units Project Scope: UIDB/00319/2020.ACM PressUniversidade do MinhoCosta, Miguel Ângelo PeixotoCosta, Diogo André VeigaGomes, Tiago Manuel RibeiroPinto, Sandro2022-122022-12-01T00:00:00Zinfo:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/articleapplication/pdfapplication/pdfhttps://hdl.handle.net/1822/81556engMiguel Costa, Diogo Costa, Tiago Gomes, and Sandro Pinto. 2022. Shifting Capsule Networks from the Cloud to the Deep Edge. ACM Trans. Intell. Syst. Technol. 13, 6, Article 105 (December 2022), 25 pages. https://doi.org/10.1145/35445622157-69042157-691210.1145/3544562105https://dl.acm.org/doi/10.1145/3544562info:eu-repo/semantics/openAccessreponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãoinstacron:RCAAP2023-07-21T12:35:37Zoai:repositorium.sdum.uminho.pt:1822/81556Portal AgregadorONGhttps://www.rcaap.pt/oai/openaireopendoar:71602024-03-19T19:31:30.144416Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãofalse |
dc.title.none.fl_str_mv |
Shifting capsule networks from the cloud to the deep edge |
title |
Shifting capsule networks from the cloud to the deep edge |
spellingShingle |
Shifting capsule networks from the cloud to the deep edge Costa, Miguel Ângelo Peixoto Capsule networks Capsule network quantization Edge Cloud CMSIS-NN PULP-NN Engenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e Informática Science & Technology Indústria, inovação e infraestruturas |
title_short |
Shifting capsule networks from the cloud to the deep edge |
title_full |
Shifting capsule networks from the cloud to the deep edge |
title_fullStr |
Shifting capsule networks from the cloud to the deep edge |
title_full_unstemmed |
Shifting capsule networks from the cloud to the deep edge |
title_sort |
Shifting capsule networks from the cloud to the deep edge |
author |
Costa, Miguel Ângelo Peixoto |
author_facet |
Costa, Miguel Ângelo Peixoto Costa, Diogo André Veiga Gomes, Tiago Manuel Ribeiro Pinto, Sandro |
author_role |
author |
author2 |
Costa, Diogo André Veiga Gomes, Tiago Manuel Ribeiro Pinto, Sandro |
author2_role |
author author author |
dc.contributor.none.fl_str_mv |
Universidade do Minho |
dc.contributor.author.fl_str_mv |
Costa, Miguel Ângelo Peixoto Costa, Diogo André Veiga Gomes, Tiago Manuel Ribeiro Pinto, Sandro |
dc.subject.por.fl_str_mv |
Capsule networks Capsule network quantization Edge Cloud CMSIS-NN PULP-NN Engenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e Informática Science & Technology Indústria, inovação e infraestruturas |
topic |
Capsule networks Capsule network quantization Edge Cloud CMSIS-NN PULP-NN Engenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e Informática Science & Technology Indústria, inovação e infraestruturas |
description |
Capsule networks (CapsNets) are an emerging trend in image processing. In contrast to a convolutional neural network, CapsNets are not vulnerable to object deformation, as the relative spatial information of the objects is preserved across the network. However, their complexity is mainly related to the capsule structure and the dynamic routing mechanism, which makes it almost unreasonable to deploy a CapsNet, in its original form, in a resource-constrained device powered by a small microcontroller (MCU). In an era where intelligence is rapidly shifting from the cloud to the edge, this high complexity imposes serious challenges to the adoption of CapsNets at the very edge. To tackle this issue, we present an API for the execution of quantized CapsNets in Arm Cortex-M and RISC-V MCUs. Our software kernels extend the Arm CMSIS-NN and RISC-V PULP-NN to support capsule operations with 8-bit integers as operands. Along with it, we propose a framework to perform post-training quantization of a CapsNet. Results show a reduction in memory footprint of almost 75%, with accuracy loss ranging from 0.07% to 0.18%. In terms of throughput, our Arm Cortex-M API enables the execution of primary capsule and capsule layers with medium-sized kernels in just 119.94 and 90.60 milliseconds (ms), respectively (STM32H755ZIT6U, Cortex-M7 @ 480 MHz). For the GAP-8 SoC (RISC-V RV32IMCXpulp @ 170 MHz), the latency drops to 7.02 and 38.03 ms, respectively. |
publishDate |
2022 |
dc.date.none.fl_str_mv |
2022-12 2022-12-01T00:00:00Z |
dc.type.status.fl_str_mv |
info:eu-repo/semantics/publishedVersion |
dc.type.driver.fl_str_mv |
info:eu-repo/semantics/article |
format |
article |
status_str |
publishedVersion |
dc.identifier.uri.fl_str_mv |
https://hdl.handle.net/1822/81556 |
url |
https://hdl.handle.net/1822/81556 |
dc.language.iso.fl_str_mv |
eng |
language |
eng |
dc.relation.none.fl_str_mv |
Miguel Costa, Diogo Costa, Tiago Gomes, and Sandro Pinto. 2022. Shifting Capsule Networks from the Cloud to the Deep Edge. ACM Trans. Intell. Syst. Technol. 13, 6, Article 105 (December 2022), 25 pages. https://doi.org/10.1145/3544562 2157-6904 2157-6912 10.1145/3544562 105 https://dl.acm.org/doi/10.1145/3544562 |
dc.rights.driver.fl_str_mv |
info:eu-repo/semantics/openAccess |
eu_rights_str_mv |
openAccess |
dc.format.none.fl_str_mv |
application/pdf application/pdf |
dc.publisher.none.fl_str_mv |
ACM Press |
publisher.none.fl_str_mv |
ACM Press |
dc.source.none.fl_str_mv |
reponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação instacron:RCAAP |
instname_str |
Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação |
instacron_str |
RCAAP |
institution |
RCAAP |
reponame_str |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
collection |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
repository.name.fl_str_mv |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação |
repository.mail.fl_str_mv |
|
_version_ |
1799132824096210944 |