We first propose a full-stage knowledge distillation method with online hard prompt sampling strategy to distill a lightweight student model. We also adapt the post-training quantization to the promptable segmentation task and further reducing the computational cost. Moreover, a hierarchical segmenting everything strategy is proposed to accelerate the everything inference by with almost no performance degradation. With all these proposed methods, our TinySAM leads to orders of magnitude computational reduction and pushes the envelope for efficient segment anything task. Extensive experiments on various zero-shot transfer tasks demonstrate the significantly advantageous performance of our TinySAM against counterpart methods.
The proposed framework and zero-shot instance segmentation results are shown below:
SNN-MLP
├── demo.py # demo entry
├── fig
│ ├── picture1.jpg # demo picture
│ └── tinysam.png # the illustration of the framework of tinysam
├── README.md # Readme
└── tinysam # source code of tinySAM
After installing MindSpore via the official website, you can start evaluation as follows:
Download ckpts from modelzoo.
# infer example
python demo.py #CPU
Please check the official homepage.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。