SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.09579 · 2023

MobileSAMv2: Faster Segment Anything to Everything

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 7 functions out of this paper's own repositories and ran 2 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
chaoningzhang/mobilesam canonical 2 of 7
FunctionStatusWhere it lives
get_rel_pos Ran chaoningzhang/mobilesam/mobile_sam/modeling/image_encoder.py
code served (permissive licence) · get_code("733d7f0bedcb74c2")
window_partition Ran chaoningzhang/mobilesam/mobile_sam/modeling/image_encoder.py
code served (permissive licence) · get_code("105fa08885dc36cc")
build_sam_vit_b Not yet run chaoningzhang/mobilesam/mobile_sam/build_sam.py
code served (permissive licence) · get_code("f9bc5f31ce61cee8")
build_sam_vit_h Not yet run chaoningzhang/mobilesam/mobile_sam/build_sam.py
code served (permissive licence) · get_code("6b77c1f11fff3ed6")
build_sam_vit_l Not yet run chaoningzhang/mobilesam/mobile_sam/build_sam.py
code served (permissive licence) · get_code("3f8890e695469246")
register_tiny_vit_model Not yet run chaoningzhang/mobilesam/mobile_sam/modeling/tiny_vit_sam.py
code served (permissive licence) · get_code("9d5a5692e595b123")
window_unpartition Not yet run chaoningzhang/mobilesam/mobile_sam/modeling/image_encoder.py
code served (permissive licence) · get_code("27be441cc8213e52")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Segment anything model (SAM) addresses two practical yet challenging segmentation tasks: \textbf{segment anything (SegAny)}, which utilizes a certain point to predict the mask for a single object of interest, and \textbf{segment everything (SegEvery)}, which predicts the masks for all objects on the image. What makes SegAny slow for SAM is its heavyweight image encoder, which has been addressed by MobileSAM via decoupled knowledge distillation. The efficiency bottleneck of SegEvery with SAM, however, lies in its mask decoder because it needs to first generate numerous masks with redundant grid-search prompts and then perform filtering to obtain the final valid masks. We propose to improve its efficiency by directly generating the final masks with only valid prompts, which can be obtained through object discovery. Our proposed approach not only helps reduce the total time on the mask decoder by at least 16 times but also achieves superior performance. Specifically, our approach yields an average performance boost of 3.6\% (42.5\% \textit{v.s.} 38.9\%) for zero-shot object proposal on the LVIS dataset with the mask AR@$K$ metric. Qualitative results show that our approach generates fine-grained masks while avoiding over-segmenting things. This project targeting faster SegEvery than the original SAM is termed MobileSAMv2 to differentiate from MobileSAM which targets faster SegAny. Moreover, we demonstrate that our new prompt sampling is also compatible with the distilled image encoders in MobileSAM, contributing to a unified framework for efficient SegAny and SegEvery. The code is available at the same link as MobileSAM Project \href{https://github.com/ChaoningZhang/MobileSAM}{\textcolor{red}{https://github.com/ChaoningZhang/MobileSAM}}. \end{abstract}

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2312.09579")
get_code_for_paper("2312.09579")
have("2312.09579")

Connect an agent — have() is free.