HiM2SAM: Enhancing SAM2 with Hierarchical Motion Estimation and Memory Optimization towards Long-term Tracking

Ruixiang Chen, Guolei Sun, Yawei Li, Jie Qin, Luca Benini
7/10/2025
11 citations
cs.CV

Official code: LouisFinner/HiM2SAM (31 stars, Python, Apache-2.0, last commit 2025-08-30).

Abstract

This paper presents enhancements to the SAM2 framework for video object tracking task, addressing challenges such as occlusions, background clutter, and target reappearance. We introduce a hierarchical motion estimation strategy, combining lightweight linear prediction with selective non-linear refinement to improve tracking accuracy without requiring additional training.

Show full abstract

In addition, we optimize the memory bank by distinguishing long-term and short-term memory frames, enabling more reliable tracking under long-term occlusions and appearance changes. Experimental results show consistent improvements across different model scales. Our method achieves state-of-the-art performance on LaSOT and LaSOText with the large model, achieving 9.6% and 7.2% relative improvements in AUC over the original SAM2, and demonstrates even larger relative gains on smaller models, highlighting the effectiveness of our trainless, low-overhead improvements for boosting long-term tracking performance. The code is available at https://github.com/LouisFinner/HiM2SAM.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

This is the official implementation of work HiM2SAM in PRCV25.

313Python, Jupyter NotebookJul 10, 20251 years agoApache-2.0

Similar Papers

Cite this paper

@article{chen2025himsam,
  title  = {HiM2SAM: Enhancing SAM2 with Hierarchical Motion Estimation and Memory Optimization towards Long-term Tracking},
  author = {Ruixiang Chen and Guolei Sun and Yawei Li and Jie Qin and Luca Benini},
  year   = {2025},
  eprint = {2507.07603},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.07603v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.07603.svg)](https://codeofpaper.com/paper/2507.07603)

Discussion