{"id":27999635,"url":"https://github.com/filnow/replace-anything","last_synced_at":"2025-05-08T22:59:16.955Z","repository":{"id":221186990,"uuid":"624360266","full_name":"filnow/replace-anything","owner":"filnow","description":"replace any object you want on the image with whatever you want","archived":false,"fork":false,"pushed_at":"2024-02-06T16:11:00.000Z","size":23260,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-08T22:58:55.459Z","etag":null,"topics":["flask","inpainting","opencv","python3","segment-anything","stable-diffusion"],"latest_commit_sha":null,"homepage":"","language":"Python","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/filnow.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-06T09:45:38.000Z","updated_at":"2025-03-30T02:33:11.000Z","dependencies_parsed_at":"2024-02-06T17:05:03.141Z","dependency_job_id":null,"html_url":"https://github.com/filnow/replace-anything","commit_stats":null,"previous_names":["filnow/replace-anything"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filnow%2Freplace-anything","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filnow%2Freplace-anything/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filnow%2Freplace-anything/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filnow%2Freplace-anything/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filnow","download_url":"https://codeload.github.com/filnow/replace-anything/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253160764,"owners_count":21863627,"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":["flask","inpainting","opencv","python3","segment-anything","stable-diffusion"],"created_at":"2025-05-08T22:59:15.914Z","updated_at":"2025-05-08T22:59:16.944Z","avatar_url":"https://github.com/filnow.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\nThe website allows segmentation of objects by clicking on the desired thing in the photo and replacing it with any other object through the appropriate prompt using inpainting.\n\nSegmentation is done using [SAM](https://github.com/facebookresearch/segment-anything), inpating is done using [Diffusers](https://github.com/huggingface/diffusers).\n\n# Installation \n\nFirstly you need to download a SAM model and requirements.\nThat can be done with setup.sh script.\n\n```bash\n\ngit clone https://github.com/filnow/replace-anything.git\ncd replace-anything\nchmod +x setup.sh\n./setup.sh {MODEL_NAME}\n\n```\nwhere {MODEL_NAME} should be replaced with one of the following options:\n\n* vit_h: download the Huge model (2,4GB).\n\n* vit_l: download the Large model (1,2GB).\n\n* vit_b: download the Big model (358MB).\n\nFor example, to download the Large model, you would run:\n\n```bash\n\n./setup.sh vit_l\n\n```\nTo start a web app you need to run this command with proper model argument.\n\n```bash\n\npython3 app.py --model={MODEL_NAME}\n\n```\nTo use inpainting pass a flag before starting a web app.\n\n```bash\n\npython3 app.py --model={MODEL_NAME} --inpainting\n\n```\n\nAfter first prompt the Stable Diffusion will download automatically (about 10GB) and then you good to go.\n\nDespite our limitations in hardware it takes abour 2s for a segmentation and 6s for inpainting for vit_l on GPU with 6GB of memory and CUDA environment.\n\n# Results\n\n* TODO: add results, add arrow.svg as sumbit button\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilnow%2Freplace-anything","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilnow%2Freplace-anything","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilnow%2Freplace-anything/lists"}