{"id":19887997,"url":"https://github.com/acly/dlimgedit","last_synced_at":"2025-05-02T17:31:35.077Z","repository":{"id":184523352,"uuid":"672041145","full_name":"Acly/dlimgedit","owner":"Acly","description":"A C++ library for image painting and editing workflows which make use of deep learning.","archived":false,"fork":false,"pushed_at":"2023-08-23T10:48:00.000Z","size":368,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-21T00:59:38.309Z","etag":null,"topics":["cpp","deep-neural-networks","image-editing","image-segmentation","native","onnx"],"latest_commit_sha":null,"homepage":"","language":"C++","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/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}},"created_at":"2023-07-28T19:04:14.000Z","updated_at":"2024-04-06T10:28:07.000Z","dependencies_parsed_at":"2023-07-28T20:36:05.498Z","dependency_job_id":null,"html_url":"https://github.com/Acly/dlimgedit","commit_stats":null,"previous_names":["acly/dlimgedit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Acly%2Fdlimgedit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Acly%2Fdlimgedit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Acly%2Fdlimgedit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Acly%2Fdlimgedit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Acly","download_url":"https://codeload.github.com/Acly/dlimgedit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224324513,"owners_count":17292521,"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":["cpp","deep-neural-networks","image-editing","image-segmentation","native","onnx"],"created_at":"2024-11-12T18:06:03.194Z","updated_at":"2024-11-12T18:06:03.701Z","avatar_url":"https://github.com/Acly.png","language":"C++","readme":"# \\\u003cdlimgedit\\\u003e\n\n*dlimgedit* is a C++ library for image painting and editing workflows which make use of deep learning.\n\n* Simple high-level C++ API\n* Flexible integration (supports dynamic loading via C interface)\n* Optimized for minimal copying and overhead\n* Fully C++ based neural network inference (via [onnxruntime](https://onnxruntime.ai/))\n* *Platforms:* Windows, Linux\n* *Backends:* CPU, GPU via DirectML (Windows only), GPU via CUDA (Linux/NVIDIA only)\n\n## Features\n\n### Segmentation\n\nIdentify objects in an image and generate masks for them (based on [SegmentAnything](https://segment-anything.com))\n\n```cpp\n// Load an image...\nImage image = Image::load(\"example.png\");\n// ...or use existing image data:\nImageView image(pixel_data, {width, height}, Channels::rgba);\n\n// Analyse the image\nEnvironment env;\nSegmentation segmentation = Segmentation::process(image, env);\n\n// Query mask for the object at a certain point in the image:\nImage mask = segmentation.compute_mask(Point{220, 355});\n\n// Query mask for the largest object contained in a certain region:\nImage mask = segmentation.compute_mask(Region(Point{140, 200}, Extent{300, 300}));\n```\n\nPerformance is interactive: roughly 500ms for `Segmentation::process` and 80ms per mask on CPU. Running on GPU can be much faster: 50ms and 12ms respectively on RTX4070, with around 500MB of VRAM used.\n\n\n## Building\n\nBuilding only requires CMake and a compiler with C++20 support (eg. MSVC 2022 on Windows, GCC 11+ on Linux).\n\nClone the repository:\n```sh\ngit clone https://github.com/Acly/dlimgedit.git\ncd dlimgedit\n```\nConfigure:\n```sh\nmkdir build\ncd build\ncmake ..\n```\nBuild:\n```sh\ncmake --build . --config Release\n```\n\n\n## Documentation\n\nThe library can be added to existing CMake projects either via `add_subdirectory(dlimgedit)` to build from source, or by adding the target from installed binaries with `find_package(dlimgedit)`. Packages should work out of the box on CPU. The `onnxruntime` shared library is installed as a required runtime dependency. Execution on GPU may require further libraries at runtime, see below.\n\nThe public API is C++14 compatible.\n\nSee the [public header](src/include/dlimgedit/dlimgedit.hpp) for API documentation.\n\n### GPU on Windows (DirectML)\n\nUsing `Backend::gpu` on Windows makes use of [DirectML](https://github.com/microsoft/DirectML) to run inference on GPU. A large range of GPUs is supported. Deploying `DirectML.dll` next to applications is recommended, otherwise the version of the DLL which ships with Windows will be used, and it is usually too old.\n\n### GPU on Linux (CUDA)\n\nUsing `Backend::gpu` on Linux makes use of CUDA to run inference on GPU. This requires the following additional libraries to be installed:\n* [NVIDIA CUDA Toolkit (Version 11.x)](https://developer.nvidia.com/cuda-11-8-0-download-archive)\n* [NVIDIA cuDNN (Version 8.x for CUDA 11.x)](https://developer.nvidia.com/cudnn)\n\nRefer to [NVIDIA's installation guide](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html) for detailed instructions.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facly%2Fdlimgedit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facly%2Fdlimgedit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facly%2Fdlimgedit/lists"}