--- license: cc-by-4.0 language: - en pipeline_tag: image-segmentation library_name: zim-anything tags: - matting - segmentation - segment anything - zero-shot matting --- # ZIM-Anything-ViTB ## Introduction Zero-Shot Image Matting ## Installation ```bash pip install zim_anything ``` or ```bash git clone https://github.com/naver-ai/ZIM.git cd ZIM; pip install -e . ``` ## Usage Download the [model](https://huggingface.co/depth-anything/Depth-Anything-V2-Large/resolve/main/depth_anything_v2_vitl.pth?download=true) first and put it under the `results` directory. ```python from zim_anything import zim_model_registry, ZimPredictor backbone = "vit_b" ckpt_p = "results/zim_vit_b_2043" model = zim_model_registry[backbone](checkpoint=ckpt_p) if torch.cuda.is_available(): model.cuda() predictor = ZimPredictor(model) predictor.set_image() masks, _, _ = predictor.predict() ``` ## Citation If you find this project useful, please consider citing: ```bibtex @article{kim2024zim, title={ZIM: Zero-Shot Image Matting for Anything}, author={Kim, Beomyoung and Shin, Chanyong and Jeong, Joonhyun and Jung, Hyungsik and Lee, Se-Yun and Chun, Sewhan and Hwang, Dong-Hyun and Yu, Joonsang}, journal={arXiv preprint arXiv:2411.00626}, year={2024} }