{"id":30290431,"url":"https://github.com/a904guy/smart_segments","last_synced_at":"2025-08-16T23:13:19.027Z","repository":{"id":307231730,"uuid":"1028755205","full_name":"a904guy/Smart_Segments","owner":"a904guy","description":"KRITA Plugin - Smart Segments - Segment Anything Model 2","archived":false,"fork":false,"pushed_at":"2025-07-30T04:54:55.000Z","size":6772,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-30T06:37:25.823Z","etag":null,"topics":[],"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/a904guy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2025-07-30T02:47:12.000Z","updated_at":"2025-07-30T05:22:34.000Z","dependencies_parsed_at":"2025-07-30T06:37:30.777Z","dependency_job_id":"f00a4ebf-57b7-4e43-8fa4-ab2f9416e7dd","html_url":"https://github.com/a904guy/Smart_Segments","commit_stats":null,"previous_names":["a904guy/smart_segments"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/a904guy/Smart_Segments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a904guy%2FSmart_Segments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a904guy%2FSmart_Segments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a904guy%2FSmart_Segments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a904guy%2FSmart_Segments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a904guy","download_url":"https://codeload.github.com/a904guy/Smart_Segments/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a904guy%2FSmart_Segments/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270781393,"owners_count":24643820,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-08-16T23:13:18.475Z","updated_at":"2025-08-16T23:13:19.017Z","avatar_url":"https://github.com/a904guy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎨 Smart Segments for Krita\n\n**AI-Powered Intelligent Segmentation Plugin**\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Python](https://img.shields.io/badge/Python-3.7%2B-blue.svg)](https://www.python.org/downloads/)\n[![Krita](https://img.shields.io/badge/Krita-5.0%2B-purple.svg)](https://krita.org/)\n\nTransform your digital art workflow with cutting-edge AI segmentation technology. Smart Segments leverages the power of SAM2 (Segment Anything Model 2) to provide intuitive, one-click object detection and selection in Krita.\n\n---\n\n## ✨ Features\n\n- 🧠 **AI-Powered Segmentation** - Advanced machine learning for precise object detection\n- 🎯 **Interactive Selection** - Click-to-select any object in your artwork\n- ⚡ **Real-time Preview** - Instant visual feedback as you work\n- 🔧 **Smart Tools Integration** - Seamless integration with Krita's native tools\n- 🎨 **Artist-Friendly** - Designed by artists, for artists\n- 🚀 **One-Click Setup** - Automated installation and configuration\n\n## 📋 Prerequisites\n\n| Requirement | Version | Notes |\n|-------------|---------|-------|\n| **Krita** | 5.0+ | APT version with Python support (not Snap) |\n| **Python** | 3.7+ | System Python installation |\n| **PyQt5** | Latest | For Python-Krita bindings |\n| **Disk Space** | ~5GB | For AI models and dependencies |\n| **RAM** | 4GB+ | Recommended for optimal performance |\n\n### 🖥️ Platform Support\n\n**Built and tested on Ubuntu 24.04 LTS**, with potential cross-platform compatibility for:\n- 🐧 **Linux** (Ubuntu, Debian, Fedora, Arch)\n- 🪟 **Windows** 10/11\n- 🍎 **macOS** (experimental)\n\n#### Ubuntu Development Dependencies\n```bash\nsudo apt install libgtk-4-dev libadwaita-1-dev git blueprint-compiler gettext libxml2-utils libgtk4-layer-shell-dev\n```\n\n\u003e **Note**: While developed on Ubuntu, the plugin architecture supports cross-platform deployment. Windows and macOS compatibility may require additional testing.\n\n## 🚀 Installation\n\n### 🎯 Method 1: Import from GitHub (Recommended)\n\n1. **Open Krita**\n2. Navigate to **Tools** → **Scripts** → **Import Python Plugin from Web**\n3. Enter this GitHub repository URL:\n   ```\n   https://github.com/a904guy/Smart_Segments/releases/download/1.0.0/SmartSegments_v1.0.0.zip\n   ```\n4. Click **OK** and wait for download to complete\n5. **Restart Krita**\n6. Go to **Settings** → **Configure Krita** → **Python Plugin Manager**\n7. Enable **\"Smart Segments\"** plugin\n8. **Restart Krita** again\n9. Access via **Tools** → **Smart Segments**\n\n### 📦 Method 2: Import from Release ZIP\n\n1. **Download** the latest release ZIP from [GitHub Releases](https://github.com/a904guy/Smart_Segments/releases)\n2. **Open Krita**\n3. Navigate to **Tools** → **Scripts** → **Import Python Plugin from Zip File**\n4. Select the downloaded ZIP file\n5. **Restart Krita**\n6. Go to **Settings** → **Configure Krita** → **Python Plugin Manager**\n7. Enable **\"Smart Segments\"** plugin\n8. **Restart Krita** again\n9. Access via **Tools** → **Smart Segments**\n\n### 🛠️ Method 3: Developer Installation\n\n\u003cdetails\u003e\n\u003csummary\u003eFor developers and advanced users (click to expand)\u003c/summary\u003e\n\nThis method creates symbolic links for live development:\n\n```bash\n./dev-install.sh\n```\n\n**What this does:**\n- ✅ Verifies Krita installation and Python support\n- ✅ Installs missing dependencies automatically\n- ✅ Creates development symlinks for live editing\n- ✅ Provides step-by-step activation guide\n\n#### Manual Development Setup\n```bash\n# Create Krita plugin directory\nmkdir -p ~/.local/share/krita/pykrita\n\n# Create symbolic links for development\nln -sf \"$(pwd)/smart_segments\" ~/.local/share/krita/pykrita/smart_segments\nln -sf \"$(pwd)/smart_segments.desktop\" ~/.local/share/krita/pykrita/smart_segments.desktop\n```\n\n\u003c/details\u003e\n\n## 📸 Screenshots\n\nSee Smart Segments in action with these screenshots from the development process:\n\n\u003cdiv align=\"center\"\u003e\n\n\n![Screenshot from 18:46](resources/images/Screenshot%20From%202025-07-29%2018-46-10.png)\n\n![Screenshot from 22:14](resources/images/Screenshot%20From%202025-07-29%2022-14-44.png)\n\n![Screenshot from 18:50](resources/images/Screenshot%20From%202025-07-29%2018-50-05.png)\n\n![Screenshot from 19:12](resources/images/Screenshot%20From%202025-07-29%2019-12-01.png)\n\n![Screenshot from 18:49](resources/images/Screenshot%20From%202025-07-29%2018-49-16.png)\n\n![Screenshot from 19:07](resources/images/Screenshot%20From%202025-07-29%2019-07-37.png)\n\n![Screenshot from 19:15](resources/images/Screenshot%20From%202025-07-29%2019-15-20.png)\n\n![Screenshot from 19:15](resources/images/Screenshot%20From%202025-07-29%2019-15-30.png)\n\n![Screenshot from 21:43](resources/images/Screenshot%20From%202025-07-29%2021-43-53.png)\n\n![Screenshot from 21:12](resources/images/Screenshot%20From%202025-07-29%2021-12-12.png)\n\n![Screenshot from 21:41](resources/images/Screenshot%20From%202025-07-29%2021-41-13.png)\n\n![Screenshot from 21:43](resources/images/Screenshot%20From%202025-07-29%2021-43-11.png)\n\n\n\u003c/div\u003e\n\n\n## 👨‍💻 Development\n\n\u003e **Development Mode**: The plugin uses symbolic links, so code changes are immediately available after restarting Krita.\n\n### Command Reference\n\n| Command | Description | Alternative |\n|---------|-------------|-------------|\n| `./dev-install.sh` | Install plugin (dev mode) | - |\n| `./dev-uninstall.sh` | Remove plugin | - |\n| `./dev-utils.sh help` | Show all utilities | - |\n| `./dev-utils.sh bundle` | Create distribution | `python3 create_plugin_package.py` |\n| `./dev-utils.sh test` | Run test suite | `cd tests \u0026\u0026 python3 run_tests.py` |\n| `./dev-utils.sh clean` | Clean artifacts | - |\n| `./dev-utils.sh version` | Show version | - |\n\n### 📂 Project Structure\n\n```\n📦 Smart Segments\n├── 🎨 smart_segments/             # Main plugin source\n├── 🧪 tests/                     # Test suite\n├── 📚 documents/                 # Documentation\n├── 🎁 resources/                 # Icons and assets\n├── 🔧 dev-*.sh                   # Development scripts\n└── 📋 create_plugin_package.py   # Distribution builder\n```\n\n## 📁 File Locations\n\n| Component | Location | Type |\n|-----------|----------|------|\n| **Plugin Source** | `smart_segments/` | Directory |\n| **Plugin Installation** | `~/.local/share/krita/pykrita/smart_segments` | Symlink |\n| **Krita Logs** | `~/.local/share/krita/krita.log` | File |\n| **Krita Config** | `~/.local/share/krita/` | Directory |\n\n## 🚨 Troubleshooting\n\n### 🔍 Plugin Not Appearing\n\n\u003cdetails\u003e\n\u003csummary\u003eClick for troubleshooting steps\u003c/summary\u003e\n\n1. **Verify Krita Version**\n   ```bash\n   which krita  # Should show: /usr/bin/krita\n   ```\n\n2. **Check Plugin Installation**\n   ```bash\n   ls -la ~/.local/share/krita/pykrita/\n   ```\n\n3. **Monitor Krita Logs**\n   ```bash\n   tail -f ~/.local/share/krita/krita.log\n   ```\n\n4. **Common Issues**\n   - ❌ Using Snap version of Krita (doesn't support Python plugins)\n   - ❌ Missing PyQt5 bindings\n   - ❌ Plugin not enabled in Python Plugin Manager\n\n\u003c/details\u003e\n\n### 📦 Snap Version Issue\n\nIf you have the Snap version of Krita, you'll need to switch to the APT version:\n\n```bash\n# Remove snap version\nsudo snap remove krita\n\n# Install APT version with Python support\nsudo apt install krita python3-pyqt5\n```\n\n### 🔧 Diagnostic Commands\n\n```bash\n# System check\n./dev-utils.sh version\n\n# Plugin verification\nls -la ~/.local/share/krita/pykrita/smart_segments\n\n# Real-time log monitoring\ntail -f ~/.local/share/krita/krita.log\n```\n\n## 🔮 First Time Setup\n\nWhen you first launch Smart Segments, the **Setup Wizard** automatically handles everything:\n\n### 🎯 Automated Setup Process\n\n```mermaid\ngraph LR\n    A[Launch Plugin] --\u003e B[System Check]\n    B --\u003e C[Create Virtual Env]\n    C --\u003e D[Download AI Models]\n    D --\u003e E[Install Dependencies]\n    E --\u003e F[Test Segmentation]\n    F --\u003e G[Ready to Use! 🎉]\n```\n\n| Step | Description | Time | Requirements |\n|------|-------------|------|--------------|\n| 1️⃣ | **System Requirements Check** | ~5s | - |\n| 2️⃣ | **Virtual Environment Creation** | ~30s | Python 3.7+ |\n| 3️⃣ | **AI Model Download (SAM2)** | ~5-10min | Internet connection |\n| 4️⃣ | **Dependency Installation** | ~2-5min | Internet connection |\n| 5️⃣ | **Test Segmentation** | ~30s | - |\n\n\u003e **📡 Internet Required**: First setup requires internet connection for downloading AI models (~2-3GB)\n\n## 🔧 System Requirements\n\n### 💾 Dependencies (Auto-installed)\n- **PyTorch** - Deep learning framework\n- **SAM2 Models** - AI segmentation models  \n- **NumPy** - Numerical computing\n- **OpenCV** - Computer vision utilities\n- **Pillow** - Image processing\n\n### 💿 Storage Requirements\n- **Base Plugin**: ~50MB\n- **AI Models**: ~2-3GB  \n- **Dependencies**: ~1-2GB\n- **Total**: ~5GB\n\n---\n\n## 🤝 Contributing\n\nWe welcome contributions! See our [contributing guidelines](CONTRIBUTING.md) for details.\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- **Krita Foundation** - For the amazing open-source digital painting software\n- **Meta AI** - For the incredible SAM2 model\n- **PyTorch Team** - For the powerful deep learning framework\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Made with ❤️ by [Hawkins.Tech Inc](https://github.com/a904guy/Smart_Segments)**\n\n[🐛 Report Bug](https://github.com/a904guy/Smart_Segments/issues) • [✨ Request Feature](https://github.com/a904guy/Smart_Segments/issues) • [📖 Documentation](https://github.com/a904guy/Smart_Segments)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa904guy%2Fsmart_segments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa904guy%2Fsmart_segments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa904guy%2Fsmart_segments/lists"}