Skip to content

Krita plugin which adds selection tools to mask objects with a single click, or by drawing a bounding box.

License

Notifications You must be signed in to change notification settings

Acly/krita-ai-tools

Repository files navigation

Krita Vision Tools

Installation | Release Download | Building

Plugin for Krita which adds various tools and filters based on machine learning:

  • Selection tools to mask objects in your image
  • Background removal filter
  • Alternative "Smart Patch" for filling/smoothing small areas

Select Segment from Point

Click on things to select them!

SegmentFromPoint.mp4

Select Segment from Box

Draw a box around things to select them!

SegmentFromBox.mp4

Precise mode

Select "Precise" in Tool options to get better quality masks. Depending on hardware the operation can take several seconds. This model typically extracts all foreground objects in the area, rather than one specific object that is contained entirely in the box.

precise-mode

Background Removal

Filter which extracts colors belonging to foreground objects in a layer. You can find it at Filters › Other › Background Removal...

background-removal

Installation

The current version of the plugin is built for Krita 5.2.11. Using it with other versions may lead to crashes.

You can download the latest version of the plugin from the releases page. Currently Windows and Linux are supported.

Plugin installation

Since version 2.0, the plugin can be installed as a Python extension. In Krita, go to Tools › Scripts › Import Python Plugin from File... and select the .zip file you downloaded.

installation

Accept and restart Krita. The plugin should now be active, and the tools appear in the tool bar.

Show Krita Python Plugin manager

Warning

If you have an older version (before 2.0) of the plugin installed, please remove it first. The easiest way is re-installing the latest version of Krita (you will keep your settings).

Alternative Models

The Plugin comes with a default ML model for each task. There are alternative models which can yield higher precision and better results, but usually at the cost of running slower and higher memory requirements.

Model files have the .gguf file extension.

Background Removal

Models Download

You can find the location where to place models with the "Folder" button in the Background Removal Filter dialog.

background-removal-models

Building

To build the plugin, it has to be part of the Krita source tree and build alongside. Refer to Building Krita from Source for setting up the environment.

After GIT checkout of the Krita sources, go to the root of the Krita repository, and clone this repository into the plugins folder:

cd krita/plugins
git clone https://github.com/Acly/krita-ai-tools.git

Next modify the CMakeLists.txt in the same folder (krita/plugins) by appending the following line:

add_subdirectory( krita-ai-tools )

Now build and install Krita as usual according to official instructions, and the plugin will be built alongside.

Technology

About

Krita plugin which adds selection tools to mask objects with a single click, or by drawing a bounding box.

Resources

License

Stars

Watchers

Forks

Packages

No packages published