[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-92321":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":13,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":16,"rankGlobal":10,"rankLanguage":10,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":18,"hasPages":18,"topics":20,"createdAt":10,"pushedAt":10,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":15,"starSnapshotCount":15,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},92321,"SAM2Matting","FudanCVL\u002FSAM2Matting","FudanCVL","[ECCV 2026] SAM2Matting: Generalized Image and Video Matting","https:\u002F\u002Fhenghuiding.com\u002FSAM2Matting",null,"Python",57,3,1,0,42.11,"Other",false,"main",[21,22,23],"image-matting","tracking-segmentation-matting-unified","video-matting","2026-07-22 04:02:05","\u003Ch1 align=\"center\">\nSAM2Matting: Generalized Image and Video Matting\n\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>Ruiqi Shen\u003C\u002Fstrong>\u003Csup style=\"font-size: 0.7em;\">*1\u003C\u002Fsup>\n  ·\n  \u003Cstrong>Guangquan Jie\u003C\u002Fstrong>\u003Csup style=\"font-size: 0.7em;\">*1\u003C\u002Fsup>\n  .\n  \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=XlQP0GIAAAAJ&hl=zh-CN\">\u003Cstrong>Chang Liu\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup style=\"font-size: 0.7em;\">2✉️\u003C\u002Fsup>\n  ·\n  \u003Ca href=\"https:\u002F\u002Fhenghuiding.com\u002F\">\u003Cstrong>Henghui Ding\u003C\u002Fstrong>\u003C\u002Fa>\u003Csup style=\"font-size: 0.7em;\">1✉️\u003C\u002Fsup>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Csup>1\u003C\u002Fsup>Fudan University &nbsp;&nbsp;\n  \u003Csup>2\u003C\u002Fsup>Shanghai University of Finance and Economics  &nbsp;\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fhenghuiding.com\u002FSAM2Matting\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject-Page-2563eb?style=flat&logo=github&logoColor=white\" alt=\"Project Page\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2606.27339\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2606.27339-b31b1b?style=flat&logo=arxiv&logoColor=white\" alt=\"arXiv\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FFudanCVL\u002FSAM2Matting\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FModels-Hugging%20Face-ffd21e?style=flat&logo=huggingface&logoColor=white\" alt=\"Hugging Face Models\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>SAM2Matting\u003C\u002Fstrong> is a generalized matting framework that decouples high-level tracking from dedicated low-level matting.\n  It supports \u003Cstrong>diverse prompts\u003C\u002Fstrong> for robust image & video matting of any \u003Cstrong>open-world targets.\u003C\u002Fstrong>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\" style=\"margin-bottom:0.5em;\">\n  \u003Cimg src=\"assets\u002Fteaser.png\" width=\"90%\" alt=\"SAM2Matting qualitative results on fast motion and non-human targets\"\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\" style=\"margin-top:0.4em; margin-bottom:1em;\">\n  🎥 For more visual results, slider comparisons, and demo, visit our\n  \u003Ca href=\"https:\u002F\u002Fhenghuiding.com\u002FSAM2Matting\">\u003Cb>project page\u003C\u002Fb>\u003C\u002Fa>.\n\u003C\u002Fp>\n\n\u003C!-- --- -->\n\n## ✨ Highlights\n\n- **Decoupled design** — VOS tracker for temporal consistency + ROI Detection & Progressive Matting for fine details\n- **Image-only training, video SOTA** — Strong zero-shot video matting without costly video matting datasets\n- **Diverse prompts** — Masks, points, boxes, text\n- **Open-world generalization** — Humans, animals, anime, translucent objects, rapid-motion scenes\n\n## 📋 TODO\n\n- ✅ Release checkpoints of different variants.\n- ✅ Release inference code and interactive demo.\n- ⬜ Release training code.\n\n## 🧠 Checkpoints\nWe provide three variants of SAM2Matting based on different VOS trackers.\n\n\u003Ctable>\n  \u003Cthead>\n    \u003Ctr>\n      \u003Cth>Backbone Tracker\u003C\u002Fth>\n      \u003Cth>Hugging Face\u003C\u002Fth>\n    \u003C\u002Ftr>\n  \u003C\u002Fthead>\n  \u003Ctbody>\n    \u003Ctr>\n      \u003Ctd style=\"vertical-align: middle;\">SAM2.1-T\u003C\u002Ftd>\n      \u003Ctd style=\"vertical-align: middle;\">\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FFudanCVL\u002FSAM2Matting\u002Fblob\u002Fmain\u002Fcheckpoints\u002FSAM2Matting-SAM2.1Tiny.pt\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHF-SAM2.1--T-ffd21e?style=flat&logo=huggingface&logoColor=white\" style=\"vertical-align: middle;\">\u003C\u002Fa>\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd style=\"vertical-align: middle;\">SAM2.1-B+\u003C\u002Ftd>\n      \u003Ctd style=\"vertical-align: middle;\">\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FFudanCVL\u002FSAM2Matting\u002Fblob\u002Fmain\u002Fcheckpoints\u002FSAM2Matting-SAM2.1Base%2B.pt\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHF-SAM2.1--B+-ffd21e?style=flat&logo=huggingface&logoColor=white\" style=\"vertical-align: middle;\">\u003C\u002Fa>\u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr>\n      \u003Ctd style=\"vertical-align: middle;\">SAM3\u003C\u002Ftd>\n      \u003Ctd style=\"vertical-align: middle;\">\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FFudanCVL\u002FSAM2Matting\u002Fblob\u002Fmain\u002Fcheckpoints\u002FSAM2Matting-SAM3.pt\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHF-SAM3-ffd21e?style=flat&logo=huggingface&logoColor=white\" style=\"vertical-align: middle;\">\u003C\u002Fa>\u003C\u002Ftd>\n    \u003C\u002Ftr>\n  \u003C\u002Ftbody>\n\u003C\u002Ftable>\n\nBy default, place all checkpoints under the `checkpoints\u002F` directory.\n\n## ⚙️ Installation\n```bash\n# clone the repo and enter directory\ngit clone https:\u002F\u002Fgithub.com\u002FFudanCVL\u002FSAM2Matting.git\ncd SAM2Matting\n\n# create and activate conda environment\nconda create -n sam2matting python=3.10 -y\nconda activate sam2matting\n\n# install required packages\npip install -r requirements.txt\n```\n\n## 🚀 Inference\n\nWe provide separate inference scripts for **image** and **video** matting (given initial-frame mask), organized by tracker family:\n\n| Task | SAM2 variants | SAM3 variant |\n|------|------------------------------------------|--------------|\n| **Image matting** | `inference_image_sam2.py` | `inference_image_sam3.py` |\n| **Video matting** | `inference_video_sam2.py` | `inference_video_sam3.py` |\n\nFor video matting, use `--save_mp4` to save video, and optionally use `--compiled` to enable compilation (first-time may be slow), such as:\n\n```bash\npython inference_video_sam2.py --save_mp4\npython inference_video_sam2.py --save_mp4 --compiled\n```\n\nYou can replace the samples with your own image or video.\n\n\n## 🎮 Interactive Demo\nSAM2Matting supports interactive prompt types beyond masks, including point, box (SAM2 & SAM3), and text (SAM3), run the code below:\n```bash\npython interactive_sam2.py (point by default)\npython interactive_sam3.py (text by default)\n```\n\n\n## 📚 Acknowledgements & Citation\n\nWe are inspired by the following excellent works: [SAM2](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fsam2), [SAM3](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fsam3), [MatAnyone](https:\u002F\u002Fgithub.com\u002Fpq-yang\u002FMatAnyone), and many other not listed.\n\nIf you find SAM2Matting useful in your research, please consider citing:\n\n```bibtex\n@inproceedings{SAM2Matting,\n  title={{SAM2Matting}: Generalized Image and Video Matting},\n  author={Shen, Ruiqi and Jie, Guangquan and Liu, Chang and Ding, Henghui},\n  booktitle={European Conference on Computer Vision (ECCV)},\n  year={2026}\n}\n```\n## ⚖️ License\nSAM2Matting is licensed under CC BY-NC-SA 4.0 for non-commercial research use only. For uses beyond this license, please contact henghui.ding[AT]gmail.com.\n","SAM2Matting 是一个通用图像与视频抠图框架，旨在实现开放世界目标的鲁棒抠图。其核心采用解耦设计：复用视频目标分割（VOS）跟踪器保障时序一致性，结合区域检测与渐进式抠图模块提取精细alpha matte；支持掩码、点、框、文本等多种提示输入，仅需图像数据训练即可在视频上零样本达到SOTA性能。适用于影视后期、虚拟直播、AR\u002FVR内容生成等需高精度前景分离的场景，尤其擅长处理快速运动、非人目标（如动物、动漫角色）及半透明物体。",2,"2026-07-08 04:30:04","CREATED_QUERY"]