{"id":22069117,"url":"https://github.com/Kingfish404/segment-anything-webui","last_synced_at":"2025-07-24T07:32:19.852Z","repository":{"id":166717851,"uuid":"625550370","full_name":"Kingfish404/segment-anything-webui","owner":"Kingfish404","description":"Yet another SAM webui + CLIP","archived":false,"fork":false,"pushed_at":"2024-03-26T09:55:12.000Z","size":26,"stargazers_count":195,"open_issues_count":2,"forks_count":18,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-03-26T10:59:22.976Z","etag":null,"topics":["demo-without-backend","python","sam"],"latest_commit_sha":null,"homepage":"https://segment-anything-webui.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kingfish404.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-04-09T13:15:14.000Z","updated_at":"2024-03-26T10:49:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"547d0efe-6b19-4596-a593-7f8a5800d3e2","html_url":"https://github.com/Kingfish404/segment-anything-webui","commit_stats":null,"previous_names":["kingfish404/segment-anything-webui"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kingfish404%2Fsegment-anything-webui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kingfish404%2Fsegment-anything-webui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kingfish404%2Fsegment-anything-webui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kingfish404%2Fsegment-anything-webui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kingfish404","download_url":"https://codeload.github.com/Kingfish404/segment-anything-webui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227421427,"owners_count":17775011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["demo-without-backend","python","sam"],"created_at":"2024-11-30T20:04:41.401Z","updated_at":"2024-11-30T20:07:42.120Z","avatar_url":"https://github.com/Kingfish404.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Segment Anything web UI\n\n![demo](./assets/demo.gif)\n\nThis is a web interface for the [Segment Anything](https://github.com/facebookresearch/segment-anything).\n\n## Usage\n\n**Environment Require:**\nPython \u003e= 3.8.13, Node \u003e= 18.15.0 (LTS), CUDA or MPS(optional)\n\n1. Fowllow the instructions in the [Segment Anything](https://github.com/facebookresearch/segment-anything) and [CLIP](https://github.com/openai/CLIP) to install SAM and CLIP. And prepare webui environment:\n\n```shell\n# e.g. for Segment Anything\npip install git+https://github.com/facebookresearch/segment-anything.git\npip install opencv-python pycocotools matplotlib onnxruntime onnx\n\nmkdir model\n# download the model to `model/`\nwget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth -O model/sam_vit_b_01ec64.pth\n# https://dl.fbaipublicfiles.com/segment_anything/sam_vit_l_0b3195.pth\n# https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth\n\n# e.g. for CLIP\npip install torch torchvision\npip install ftfy regex tqdm\npip install git+https://github.com/openai/CLIP.git\n\n# python server as backend\npip3 install torch numpy 'uvicorn[standard]' fastapi pydantic python-multipart Pillow click\n# or \ncd scripts \u0026\u0026 pip3 install -r requirements.txt\n# webui frontend\nnpm i\n```\n\n2. run the server and webui on different terminals:\n\n```bash\npython3 scripts/server.py   # webui backend\nnpm run dev                 # interactive webui frontend\n```\n\nOr\n```shell\ndocker compose up\n```\n\n## Advanced\n\nChange the `.env.local` file to change the server address.\n\nThe model server can be run on a remote GUI server, and the webui can be run on a local machine.\n\nThe API in `server.py` is **Pure Function**. Though it is slow (Encoding Image Each Request), it is easy to deploy and maintain.\n\n## Reference\n\n- [Segment Anything | Meta AI](https://segment-anything.com/)\n- [facebookresearch/segment-anything: The repository provides code for running inference with the SegmentAnything Model (SAM), links for downloading the trained model checkpoints, and example notebooks that show how to use the model.](https://github.com/facebookresearch/segment-anything)\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKingfish404%2Fsegment-anything-webui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKingfish404%2Fsegment-anything-webui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKingfish404%2Fsegment-anything-webui/lists"}