{"id":19887992,"url":"https://github.com/acly/krita-ai-tools","last_synced_at":"2025-04-08T06:33:58.949Z","repository":{"id":185653795,"uuid":"673343097","full_name":"Acly/krita-ai-tools","owner":"Acly","description":"Krita plugin which adds selection tools to mask objects with a single click, or by drawing a bounding box.","archived":false,"fork":false,"pushed_at":"2025-02-10T09:06:16.000Z","size":98,"stargazers_count":543,"open_issues_count":12,"forks_count":24,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-04-01T05:32:25.060Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Acly.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":"2023-08-01T12:18:02.000Z","updated_at":"2025-04-01T02:40:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"c514c1bc-ffae-47a1-98c6-f4d3ea054058","html_url":"https://github.com/Acly/krita-ai-tools","commit_stats":null,"previous_names":["acly/krita-ai-tools"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Acly%2Fkrita-ai-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Acly%2Fkrita-ai-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Acly%2Fkrita-ai-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Acly%2Fkrita-ai-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Acly","download_url":"https://codeload.github.com/Acly/krita-ai-tools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247792533,"owners_count":20996889,"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":[],"created_at":"2024-11-12T18:06:01.647Z","updated_at":"2025-04-08T06:33:58.926Z","avatar_url":"https://github.com/Acly.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Krita Segmentation Tools\n\nPlugin which adds selection tools to mask objects in your image with a single\nclick, or by drawing a bounding box.\n\n\u003ch2\u003e\u003cimg src=\"media/tool_segmentation_point.png\"\u003e Select Segment from Point\u003c/h2\u003e\n\nClick on things to select them!\n\nhttps://github.com/Acly/krita-ai-tools/assets/6485914/71fe2bb4-9b00-4eab-b6b7-4e9aa50d2511\n\n\u003ch2\u003e\u003cimg src=\"media/tool_segmentation_rect.png\"\u003e Select Segment from Box\u003c/h2\u003e\n\nDraw a box around things to select them!\n\nhttps://github.com/Acly/krita-ai-tools/assets/6485914/38d92925-3146-4489-a2ea-a1d3aa57c72c\n\n### Precise mode\n\nSelect \"Precise\" in Tool options to get better quality masks. Depending on\nhardware the operation can take several seconds. This model typically extracts\nall foreground objects in the area, rather than one specific object that is\ncontained entirely in the box.\n\n![precise-mode](https://github.com/user-attachments/assets/f48e9e4e-a009-4275-b6d3-03cf1359cc08)\n\n## Installation\n\nThe current version of the plugin is built for [Krita 5.2.9](https://krita.org/en/download/krita-desktop/).\nUsing it with other versions may lead to crashes.\n\nYou can download the latest version of the plugin from the [releases page](https://github.com/Acly/krita-ai-tools/releases).\n\n### Windows\n\nDownload the plugin and unpack the ZIP archive into your Krita installation\nfolder. Then run Krita.\n\nHints:\n* The default installation folder is `C:\\Program Files\\Krita (x64)`\n* Copy/extract the contents of the ZIP directly, don't make a separate folder\n\n### Linux\n\nYou can use [this script](scripts/install-krita-with-segmentation.sh) to\ndownload and patch Krita with the plugin. It also creates a shortcut to run it.\n\nTo do it manually, get the Krita AppImage from the official source and extract\nit. This should result in a folder `squashfs-root`. Download the plugin `tar.gz`\nand extract it into that folder. Then run Krita. See the commands below for some\nenvironment variables that are needed to run outside the image.\n\n```sh\n./krita-5.2.9-x86_64.appimage --appimage-extract\ntar -xf krita_segmentation_plugin-linux-x64-1.1.0.tar.gz -C squashfs-root/\nAPPDIR=/squashfs-root APPIMAGE=1 ./squashfs-root/AppRun\n```\n\n#### Arch Linux\nArch users can use the `PKGBUILD` on [the AUR](https://aur.archlinux.org/packages/krita-ai-tools), or with `yay` or `paru`:\n\n```sh\nyay -S krita-ai-tools\n# or\nparu -S krita-ai-tools\n```\n\n#### GPU support\n\nDisclaimer: untested, and maybe not worth the hassle.\n\nTo use the GPU backend on Linux you need:\n* An NVIDIA GPU for CUDA support\n* [CUDA Toolkit 12.x](https://developer.nvidia.com/cuda-downloads) installed\n* [cuDNN 9.x](https://developer.nvidia.com/cudnn) installed\n* CUDA Toolkit and cuDNN libraries must be in `LD_LIBRARY_PATH`\n\n### Alternative Models\n\nFor your own experiments only, not officially supported.\n\n#### Precise mode\n\n[List of alternative model downloads](https://github.com/ZhengPeng7/BiRefNet/releases/tag/v1)\n\nTo use a different model, find the model folder and replace one or more of the\nmodels there (_recommended to make a backup!_) \n* Models are located in `share/krita/ai_models/segmentation`.\n* Models must be `.onnx` files.\n\nFiles to add or replace:\n* `birefnet_cpu.onnx` - preferred when using CPU backend\n* `birefnet_gpu.onnx` - preferred when using GPU backend\n* `birefnet_hr_cpu.onnx` - preferred when using high resolutions (~2K)\n* `birefnet_hr_gpu.onnx` - preferred when using high resolutions (~2K)\n\nIf a sepcific model doesn't exist, the other ones are used as fallback. So you\nonly really need one of them.\n\n\u003e [!TIP]\n\u003e On older GPUs it might make sense to delete the `birefnet_gpu.onnx` file for better performance.\n\n\n## Building\n\nThe plugin has to be built as part of Krita, see [Building Krita from Source](https://docs.krita.org/en/untranslatable_pages/building_krita.html#).\n\nAfter GIT checkout, clone this repository into the plugins folder:\n```sh\ncd krita/plugins\ngit clone https://github.com/Acly/krita-ai-tools.git\n```\n\nNext modify the `CMakeLists.txt` in the same folder (`krita/plugins`) by\nappending the following line:\n```cmake\nadd_subdirectory( krita-ai-tools )\n```\n\nNow build and install Krita as usual according to official instructions, and the\nplugin will be built alongside.\n\n## Technology\n\n* Object detection: [Segment Anything Model](https://segment-anything.com/), [MobileSAM](https://github.com/ChaoningZhang/MobileSAM)\n* Dichotomous segmentation: [BiRefNet](https://github.com/ZhengPeng7/BiRefNet)\n* Inference implementation: [dlimgedit](https://github.com/Acly/dlimgedit)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facly%2Fkrita-ai-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facly%2Fkrita-ai-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facly%2Fkrita-ai-tools/lists"}