AI-Powered Intelligent Segmentation Plugin
Transform 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.
- ๐ง AI-Powered Segmentation - Advanced machine learning for precise object detection
- ๐ฏ Interactive Selection - Click-to-select any object in your artwork
- โก Real-time Preview - Instant visual feedback as you work
- ๐ง Smart Tools Integration - Seamless integration with Krita's native tools
- ๐จ Artist-Friendly - Designed by artists, for artists
- ๐ One-Click Setup - Automated installation and configuration
| Requirement | Version | Notes | 
|---|---|---|
| Krita | 5.0+ | APT version with Python support (not Snap) | 
| Python | 3.7+ | System Python installation | 
| PyQt5 | Latest | For Python-Krita bindings | 
| Disk Space | 5-6 GB | For AI models (1 GB) and tooling/dependencies (4-5 GB) | 
| RAM | 4GB+ | Recommended for optimal performance | 
Built and tested on Ubuntu 24.04 LTS, with potential cross-platform compatibility for:
- ๐ง Linux (Ubuntu, Debian, Fedora, Arch)
- ๐ช Windows 10/11
- ๐ macOS (experimental)
sudo apt install libgtk-4-dev libadwaita-1-dev git blueprint-compiler gettext libxml2-utils libgtk4-layer-shell-devNote: While developed on Ubuntu, the plugin architecture supports cross-platform deployment. Windows and macOS compatibility may require additional testing.
- Open Krita
- Navigate to Tools โ Scripts โ Import Python Plugin from Web
- Enter this GitHub repository URL:
https://github.com/a904guy/Smart_Segments/releases/download/1.0.2/SmartSegments_v1.0.2.zip
- Click OK and wait for download to complete
- Restart Krita
- Go to Settings โ Configure Krita โ Python Plugin Manager
- Enable "Smart Segments" plugin
- Restart Krita again
- Access via Tools โ Smart Segments
- Download the latest release ZIP from GitHub Releases
- Open Krita
- Navigate to Tools โ Scripts โ Import Python Plugin from Zip File
- Select the downloaded ZIP file
- Restart Krita
- Go to Settings โ Configure Krita โ Python Plugin Manager
- Enable "Smart Segments" plugin
- Restart Krita again
- Access via Tools โ Smart Segments
For developers and advanced users (click to expand)
This method creates symbolic links for live development:
./dev-install.shWhat this does:
- โ Verifies Krita installation and Python support
- โ Installs missing dependencies automatically
- โ Creates development symlinks for live editing
- โ Provides step-by-step activation guide
# Create Krita plugin directory
mkdir -p ~/.local/share/krita/pykrita
# Create symbolic links for development
ln -sf "$(pwd)/smart_segments" ~/.local/share/krita/pykrita/smart_segments
ln -sf "$(pwd)/smart_segments.desktop" ~/.local/share/krita/pykrita/smart_segments.desktopSee Smart Segments in action with these screenshots from the development process:
Development Mode: The plugin uses symbolic links, so code changes are immediately available after restarting Krita.
| Command | Description | Alternative | 
|---|---|---|
| ./dev-install.sh | Install plugin (dev mode) | - | 
| ./dev-uninstall.sh | Remove plugin | - | 
| ./dev-utils.sh help | Show all utilities | - | 
| ./dev-utils.sh bundle | Create distribution | python3 create_plugin_package.py | 
| ./dev-utils.sh test | Run test suite | cd tests && python3 run_tests.py | 
| ./dev-utils.sh clean | Clean artifacts | - | 
| ./dev-utils.sh version | Show version | - | 
๐ฆ Smart Segments
โโโ ๐จ smart_segments/             # Main plugin source
โโโ ๐งช tests/                     # Test suite
โโโ ๐ documents/                 # Documentation
โโโ ๐ resources/                 # Icons and assets
โโโ ๐ง dev-*.sh                   # Development scripts
โโโ ๐ create_plugin_package.py   # Distribution builder
| Component | Location | Type | 
|---|---|---|
| Plugin Source | smart_segments/ | Directory | 
| Plugin Installation | ~/.local/share/krita/pykrita/smart_segments | Symlink | 
| Krita Logs | ~/.local/share/krita/krita.log | File | 
| Krita Config | ~/.local/share/krita/ | Directory | 
Click for troubleshooting steps
- 
Verify Krita Version which krita # Should show: /usr/bin/krita
- 
Check Plugin Installation ls -la ~/.local/share/krita/pykrita/
- 
Monitor Krita Logs tail -f ~/.local/share/krita/krita.log
- 
Common Issues - โ Using Snap version of Krita (doesn't support Python plugins)
- โ Missing PyQt5 bindings
- โ Plugin not enabled in Python Plugin Manager
 
If you have the Snap version of Krita, you'll need to switch to the APT version:
# Remove snap version
sudo snap remove krita
# Install APT version with Python support
sudo apt install krita python3-pyqt5# System check
./dev-utils.sh version
# Plugin verification
ls -la ~/.local/share/krita/pykrita/smart_segments
# Real-time log monitoring
tail -f ~/.local/share/krita/krita.logWhen you first launch Smart Segments, the Setup Wizard automatically handles everything:
graph LR
    A[Launch Plugin] --> B[System Check]
    B --> C[Create Virtual Env]
    C --> D[Download AI Models]
    D --> E[Install Dependencies]
    E --> F[Test Segmentation]
    F --> G[Ready to Use! ๐]
    | Step | Description | Time | Requirements | 
|---|---|---|---|
| 1๏ธโฃ | System Requirements Check | ~5s | - | 
| 2๏ธโฃ | Virtual Environment Creation | ~30s | Python 3.7+ | 
| 3๏ธโฃ | AI Model Download (SAM2) | ~5-10min | Internet connection | 
| 4๏ธโฃ | Dependency Installation | ~2-5min | Internet connection | 
| 5๏ธโฃ | Test Segmentation | ~30s | - | 
๐ก Internet Required: First setup requires internet connection for downloading AI models (~1GB)
- PyTorch - Deep learning framework
- SAM2 Models - AI segmentation models
- NumPy - Numerical computing
- OpenCV - Computer vision utilities
- Pillow - Image processing
- Base Plugin: ~50MB
- AI Models: ~1GB
- Tooling/Dependencies: ~4-5GB
- Total: ~5-6GB
We welcome contributions! See our contributing guidelines for details.
This project is licensed under the MIT License - see the LICENSE file for details.
- Krita Foundation - For the amazing open-source digital painting software
- Meta AI - For the incredible SAM2 model
- PyTorch Team - For the powerful deep learning framework
Made with โค๏ธ by Hawkins.Tech Inc
๐ Report Bug โข โจ Request Feature โข ๐ Documentation











