inference-speed parameter-efficient-finetuning mlp visual-tracking transformer-based position-embedding lorat vit-g
Abstract
Motivated by the Parameter-Efficient Fine-Tuning (PEFT) in large language models, we propose LoRAT, a method that unveils the power of large ViT model for tracking within laboratory-level resources. The essence of our work lies in adapting LoRA, a technique that fine-tunes a small subset of model parameters without adding inference latency, to the domain of visual tracking. However, unique challenges and potential domain gaps make this transfer not as easy as the first intuition. Firstly, a transformer-based tracker constructs unshared position embedding for template and search image. This poses a challenge for the transfer of LoRA, usually requiring consistency in the design when applied to the pre-trained backbone, to downstream tasks. Secondly, the inductive bias inherent in convolutional heads diminishes the effectiveness of parameter-efficient fine-tuning in tracking models. To overcome these limitations, we first decouple the position embeddings in transformer-based trackers into shared spatial ones and independent type ones. The shared embeddings, which describe the absolute coordinates of multi-resolution images (namely, the template and search images), are inherited from the pre-trained backbones. In contrast, the independent embeddings indicate the sources of each token and are learned from scratch. Furthermore, we design an anchor-free head solely based on MLP to adapt PETR, enabling better performance with less computational overhead. With our design, 1) it becomes practical to train trackers with the ViT-g backbone on GPUs with only memory of 25.8GB (batch size of 16); 2) we reduce the training time of the L-224 variant from 35.0 to 10.8 GPU hours; 3) we improve the LaSOT SUC score from 0.703 to 0.742 with the L-224 variant; 4) we fast the inference speed of the L-224 variant from 52 to 119 FPS. Code and models are available at https://github.com/LitingLin/LoRAT.
한국어 요약
한 줄 요약
LoRAT은 LoRA 기반 파라미터 효율적 미세 조정을 시각 추적에 적용하여, ViT-g 모델을 25.8GB GPU 메모리로 학습하고 추적 성능을 향상시킨다.
핵심 기여도
- ViT-g 백본을 25.8GB GPU 메모리에서 학습 가능하게 함 (batch size 16).
- L-224 변종의 학습 시간을 35.0 → 10.8 GPU 시간으로 감소.
- LaSOT 데이터셋에서 L-224 변종의 SUC 점수를 0.703 → 0.742로 향상.
- L-224 변종의 추론 속도를 52 → 119 FPS로 증가.
핵심 아이디어
기존 LoRA(저랭크 적응)는 대규모 언어 모델에서 파라미터 효율적 미세 조정을 가능하게 하지만, 시각 추적에 적용할 때는 두 가지 주요 문제를 제기한다. 첫째, 기존 트랜스포머 기반 추적기는 템플릿과 검색 이미지에 대해 공유되지 않은 위치 임베딩을 사용하는데, 이는 LoRA의 일관된 설계 원칙과 충돌한다. 둘째, 컨볼루션 헤드는 강한 인덕티브 바이어스를 가지므로, LoRA 기반 파라미터 효율적 조정이 효과적이지 않다. 이를 해결하기 위해, LoRAT은 위치 임베딩을 공유된 공간 임베딩과 독립적인 토큰 타입 임베딩으로 분리하고, 컨볼루션 헤드 대신 MLP 기반의 anchor-free 헤드를 설계한다. 이는 LoRA의 효과를 유지하면서도 추적 성능을 향상시킨다.
기술적 접근법
- **LoRA 적용**: 트랜스포머 백본의 일부 파라미터만 미세 조정.
- **입력 임베딩 분리**: 공유된 절대 좌표 임베딩 (ViT 사전 학습 모델에서 상속) + 독립적인 토큰 타입 임베딩 (학습).
- **MLP 기반 헤드**: 컨볼루션 헤드 대신 anchor-free MLP 헤드를 사용하여 인덕티브 바이어스 감소.
- **사전 학습 모델**: ViT-g, ViT-L 등 다양한 ViT 변종 사용.
- **하드웨어**: 25.8GB GPU 메모리에서 ViT-g 학습 가능 (batch size 16).
주요 결과
- **LaSOT 데이터셋**: L-224 변종의 SUC 점수는 0.703 → 0.742 (+0.039).
- **추론 속도**: L-224 변종의 FPS는 52 → 119 (+132.7%).
- **학습 시간**: L-224 변종의 학습 시간은 35.0 → 10.8 GPU 시간 (-71.7%).
- **가장 성능 좋은 변종**: LoRAT-g-378 (SUC 0.762), 가장 가벼운 변종: LoRAT-B-224 (SUC 0.717, 209 FPS).
의의 및 한계
LoRAT은 LoRA를 시각 추적에 성공적으로 적용하여, 대규모 ViT 모델을 실험실 수준의 자원으로 학습할 수 있도록 했다. 이는 추적 모델의 성능 향상과 동시에 학습 비용을 대폭 절감하는 데 기여한다. 특히, MLP 기반 헤드 설계와 입력 임베딩 분리 기법은 LoRA의 효과를 극대화하는 데 핵심적인 역할을 했다. 그러나 LoRAT은 주로 ViT 기반 모델에만 적용되었으며, 다른 아키텍처(예: CNN)에 대한 확장성은 명시되지 않았다. 또한, 추론 속도 향상은 특정 하드웨어 환경에서만 가능하며, 일반적인 GPU 환경에서는 동일한 효과를 보장할 수 없다는 한계가 있다.
실용적 활용
LoRAT은 고성능 추적 모델을 저비용으로 학습할 수 있는 기반을 제공하므로, 연구소나 중소 기업에서도 대규모 ViT 모델을 활용한 추적 시스템 개발이 가능해진다. 특히, 실시간 추적을 요구하는 산업(예: 드론, 자율주행)에서 유용하게 활용될 수 있다.