Image-Specific Adaptation of Transformer Encoders for Compute-Efficient Segmentation

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Yao, Manyi, Aich, Abhishek, Suh, Yumin, Roy-Chowdhury, Amit, Shelton, Christian, Chandraker, Manmohan
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866918418251251712
author Yao, Manyi
Aich, Abhishek
Suh, Yumin
Roy-Chowdhury, Amit
Shelton, Christian
Chandraker, Manmohan
author_facet Yao, Manyi
Aich, Abhishek
Suh, Yumin
Roy-Chowdhury, Amit
Shelton, Christian
Chandraker, Manmohan
contents Vision transformer based models bring significant improvements for image segmentation tasks. Although these architectures offer powerful capabilities irrespective of specific segmentation tasks, their use of computational resources can be taxing on deployed devices. One way to overcome this challenge is by adapting the computation level to the specific needs of the input image rather than the current one-size-fits-all approach. To this end, we introduce ECO-M2F or EffiCient TransfOrmer Encoders for Mask2Former-style models. Noting that the encoder module of M2F-style models incur high resource-intensive computations, ECO-M2F provides a strategy to self-select the number of hidden layers in the encoder, conditioned on the input image. To enable this self-selection ability for providing a balance between performance and computational efficiency, we present a three step recipe. The first step is to train the parent architecture to enable early exiting from the encoder. The second step is to create an derived dataset of the ideal number of encoder layers required for each training example. The third step is to use the aforementioned derived dataset to train a gating network that predicts the number of encoder layers to be used, conditioned on the input image. Additionally, to change the computational-accuracy tradeoff, only steps two and three need to be repeated which significantly reduces retraining time. Experiments on the public datasets show that the proposed approach reduces expected encoder computational cost while maintaining performance, adapts to various user compute resources, is flexible in architecture configurations, and can be extended beyond the segmentation task to object detection.
format Preprint
id arxiv_https___arxiv_org_abs_2404_15244
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Image-Specific Adaptation of Transformer Encoders for Compute-Efficient Segmentation
Yao, Manyi
Aich, Abhishek
Suh, Yumin
Roy-Chowdhury, Amit
Shelton, Christian
Chandraker, Manmohan
Computer Vision and Pattern Recognition
Machine Learning
Vision transformer based models bring significant improvements for image segmentation tasks. Although these architectures offer powerful capabilities irrespective of specific segmentation tasks, their use of computational resources can be taxing on deployed devices. One way to overcome this challenge is by adapting the computation level to the specific needs of the input image rather than the current one-size-fits-all approach. To this end, we introduce ECO-M2F or EffiCient TransfOrmer Encoders for Mask2Former-style models. Noting that the encoder module of M2F-style models incur high resource-intensive computations, ECO-M2F provides a strategy to self-select the number of hidden layers in the encoder, conditioned on the input image. To enable this self-selection ability for providing a balance between performance and computational efficiency, we present a three step recipe. The first step is to train the parent architecture to enable early exiting from the encoder. The second step is to create an derived dataset of the ideal number of encoder layers required for each training example. The third step is to use the aforementioned derived dataset to train a gating network that predicts the number of encoder layers to be used, conditioned on the input image. Additionally, to change the computational-accuracy tradeoff, only steps two and three need to be repeated which significantly reduces retraining time. Experiments on the public datasets show that the proposed approach reduces expected encoder computational cost while maintaining performance, adapts to various user compute resources, is flexible in architecture configurations, and can be extended beyond the segmentation task to object detection.
title Image-Specific Adaptation of Transformer Encoders for Compute-Efficient Segmentation
topic Computer Vision and Pattern Recognition
Machine Learning
url https://arxiv.org/abs/2404.15244