Segment images with SAM 30x faster and 3.5% memory using dilated flash attention with SAM-Lightening
Segment images with SAM 30x faster and 3.5% memory using dilated flash attention with SAM-Lightening
SAM-Lightening: A Lightweight Segment Anything Model with Dilated Flash Attention to Achieve 30 times Acceleration
arXiv paper abstract https://arxiv.org/abs/2403.09195
arXiv PDF paper https://arxiv.org/pdf/2403.09195.pdf
Segment Anything Model (SAM) has garnered significant attention in segmentation tasks due to their zero-shot generalization ability ... However ... restricted by their low inference speed and high computational memory demands
... introduce SAM-Lightening, a variant of SAM, that features a re-engineered attention mechanism, termed Dilated Flash Attention.
It not only facilitates higher parallelism, enhancing processing efficiency but also retains compatibility with the existing FlashAttention.
... propose a progressive distillation to enable an efficient knowledge transfer from the vanilla SAM without costly training from scratch.
... SAM-Lightening significantly outperforms the state-of-the-art methods in both run-time efficiency and segmentation accuracy.
... achieve an inference speed ... 30.1 times faster than the vanilla SAM and 2.1 times than the state-of-the-art ... takes 3.5% of the vanilla SAM ...
Please like and share this post if you enjoyed it using the buttons at the bottom!
Stay up to date. Subscribe to my posts https://morrislee1234.wixsite.com/website/contact
Web site with my other posts by category https://morrislee1234.wixsite.com/website
Comments