Image segmentation is one of the major computer vision tasks, which is applicable in a variety of domains, such as autonomous navigation of an unmanned aerial vehicle. However, image segmentation cannot easily materialize on tiny embedded systems because image segmentation models generally have high peak memory usage due to their architectural characteristics. This work finds that image segmentation models unnecessarily require large memory space with an existing tiny machine learning framework. That is, the existing framework cannot effectively manage the memory space for the image segmentation models. This work proposes TinySeg, a new model optimizing framework that enables memory-efficient image segmentation for tiny embedded systems. TinySeg analyzes the lifetimes of tensors in the target model and identifies long-living tensors. Then, TinySeg optimizes the memory usage of the target model mainly with two methods: (i) tensor spilling into local or remote storage and (ii) fused fetching of spilled tensors. This work implements TinySeg on top of the existing tiny machine learning framework and demonstrates that TinySeg can reduce the peak memory usage of an image segmentation model by 39.3% for tiny embedded systems.
翻译:图像分割是计算机视觉的主要任务之一,可应用于无人机自主导航等多个领域。然而,由于图像分割模型通常因其架构特性而具有较高的峰值内存使用量,因此难以在微型嵌入式系统上实现。本研究发现,在现有微型机器学习框架下,图像分割模型不必要地占用了大量内存空间,即现有框架无法有效管理图像分割模型的内存空间。本文提出TinySeg,一种新型模型优化框架,可为微型嵌入式系统实现内存高效的图像分割。TinySeg分析目标模型中张量的生命周期并识别长寿命张量,随后主要通过两种方法优化目标模型的内存使用:(i) 将张量溢出到本地或远程存储,以及 (ii) 融合式获取溢出的张量。本文在现有微型机器学习框架基础上实现了TinySeg,并证明TinySeg可为微型嵌入式系统将图像分割模型的峰值内存使用量降低39.3%。