{"id":25404885,"url":"https://github.com/poorya96/object-removal-using-opencv---stable-diffusion","last_synced_at":"2026-04-15T15:32:05.280Z","repository":{"id":277354890,"uuid":"932162342","full_name":"poorya96/Object-Removal-Using-OpenCV---Stable-Diffusion","owner":"poorya96","description":"Object Removal Using OpenCV \u0026 Stable Diffusion","archived":false,"fork":false,"pushed_at":"2025-02-13T13:56:30.000Z","size":10129,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T14:30:36.607Z","etag":null,"topics":["object-removal","opencv","python","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poorya96.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2025-02-13T13:24:42.000Z","updated_at":"2025-02-13T13:56:33.000Z","dependencies_parsed_at":"2025-02-13T14:41:18.288Z","dependency_job_id":null,"html_url":"https://github.com/poorya96/Object-Removal-Using-OpenCV---Stable-Diffusion","commit_stats":null,"previous_names":["poorya96/object-removal-using-opencv---stable-diffusion"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poorya96%2FObject-Removal-Using-OpenCV---Stable-Diffusion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poorya96%2FObject-Removal-Using-OpenCV---Stable-Diffusion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poorya96%2FObject-Removal-Using-OpenCV---Stable-Diffusion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poorya96%2FObject-Removal-Using-OpenCV---Stable-Diffusion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poorya96","download_url":"https://codeload.github.com/poorya96/Object-Removal-Using-OpenCV---Stable-Diffusion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248622576,"owners_count":21135070,"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":["object-removal","opencv","python","stable-diffusion"],"created_at":"2025-02-16T04:25:01.120Z","updated_at":"2025-10-11T22:47:22.161Z","avatar_url":"https://github.com/poorya96.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Object Removal Using OpenCV \u0026 Stable Diffusion\n\n## Overview\nThis project explores different methods for object removal from images using both traditional computer vision techniques and deep learning-based inpainting. The methods evaluated include:\n\n- **OpenCV Inpainting (INPAINT_NS \u0026 INPAINT_TELEA)**: Traditional image inpainting algorithms.\n- **Auto-Masking with OpenCV**: Automatically generating a mask for object removal.\n- **Stable Diffusion Inpainting**: A deep learning-based method for realistic object removal.\n\n## Methods \u0026 Comparison\nEach method has been tested and evaluated based on accuracy, speed, and computational requirements:\n\n| Method                      | Accuracy | Speed | Computational Cost | Suitability |\n|-----------------------------|----------|--------|---------------------|-------------|\n| **INPAINT_NS (OpenCV)**     | Low      | Fast   | Low                 | Minor object removal |\n| **INPAINT_TELEA (OpenCV)**  | Low      | Fast   | Low                 | Small defect correction |\n| **Auto Masking + OpenCV**   | Very Low | Medium | Low                 | Poor due to inaccurate mask |\n| **Stable Diffusion Inpainting** | High     | Slow   | High (GPU required) | Best for complex removals |\n\n## Installation\nTo run this project, make sure you have the required dependencies installed.\n\n### **1. Clone the Repository**\n```bash\ngit clone https://github.com/yourusername/object-removal.git\ncd object-removal\n```\n\n### **2. Create a Virtual Environment (Optional but Recommended)**\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n```\n\n### **3. Install Dependencies**\n```bash\npip install -r requirements.txt\n```\n\n\n\n## Example Results\n### **Original Image**\n![Original](fox.jpg)\n\n### **INPAINT_NS Result**\n![INPAINT_NS](INPAINT_NS_algorithm/fox-inpainting.png)\n\n### **INPAINT_TELEA Result**\n![INPAINT_TELEA](INPAINT_TELEA_algorithm/fox-inpainting.png)\n\n### **Stable Diffusion Inpainting Result**\n![Stable Diffusion](Stable_Diffusion_Inpainting/output.jpg)\n\n## Conclusion\n- **OpenCV-based methods** are fast but struggle with large missing areas.\n- **Stable Diffusion** provides superior results but is computationally expensive.\n\n## References\n- OpenCV Documentation: [https://docs.opencv.org/](https://docs.opencv.org/)\n- Stable Diffusion Inpainting: [https://huggingface.co/stabilityai](https://huggingface.co/stabilityai)\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoorya96%2Fobject-removal-using-opencv---stable-diffusion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoorya96%2Fobject-removal-using-opencv---stable-diffusion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoorya96%2Fobject-removal-using-opencv---stable-diffusion/lists"}