{"id":16284517,"url":"https://github.com/derthorsten/nifty","last_synced_at":"2025-07-19T06:35:40.714Z","repository":{"id":3637220,"uuid":"50250104","full_name":"DerThorsten/nifty","owner":"DerThorsten","description":"A nifty library for graph based image segmentation.","archived":false,"fork":false,"pushed_at":"2025-05-03T19:37:09.000Z","size":133765,"stargazers_count":45,"open_issues_count":15,"forks_count":21,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-24T15:58:05.700Z","etag":null,"topics":["image-segmentation","python","segmentation"],"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/DerThorsten.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,"zenodo":null}},"created_at":"2016-01-23T17:43:51.000Z","updated_at":"2025-05-17T20:12:05.000Z","dependencies_parsed_at":"2024-10-19T17:07:49.130Z","dependency_job_id":"1a0b997b-f582-4797-a3e2-1d1fca4dedc8","html_url":"https://github.com/DerThorsten/nifty","commit_stats":{"total_commits":1565,"total_committers":17,"mean_commits":92.05882352941177,"dds":0.5041533546325878,"last_synced_commit":"c4bd4cd90f20e68f0dbd62587aba28e4752a0ac1"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/DerThorsten/nifty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerThorsten%2Fnifty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerThorsten%2Fnifty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerThorsten%2Fnifty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerThorsten%2Fnifty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DerThorsten","download_url":"https://codeload.github.com/DerThorsten/nifty/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerThorsten%2Fnifty/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265898315,"owners_count":23845771,"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":["image-segmentation","python","segmentation"],"created_at":"2024-10-10T19:19:47.101Z","updated_at":"2025-07-19T06:35:40.659Z","avatar_url":"https://github.com/DerThorsten.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Github Workflow builds\n---------------------------------\n[![Build Status](https://github.com/DerThorsten/nifty/workflows/build/badge.svg)](https://github.com/DerThorsten/nifty/actions)\n\n\nNifty\n========\n\n\nA nifty library for 2D and 3D image segmentation,\ngraph based segmentation an opt.\nThis library provided building blocks for segmentation\nalgorithms and complex segmentation pipelines.\nThe core is implemented in C++ but\nthe suggested language to use this library from is\npython.\n\nImportant:\n=========\nTo use nifty one needs to checkout some submodules via:\n\n    git submodule init\n    git submodule update\n\nIf WITH_MP_LP is active, one needs:\n\n    git submodule update --init --recursive\n\nDocumentation:\n===============\nA very tentative [documentation of the nifty python\nmodule](http://derthorsten.github.io/nifty/docs/python/html/index.html).\n\n\nFeatures (Highlights):\n==================\n\n\n* Multicut:\n    * Multicut-Ilp (Kappes et al. 2011)\n        * Multicut-Ilp-Cplex\n        * Multicut-Ilp-Gurobi\n        * Multicut-Ilp-Glpk\n    * Decomposing Solver (Alush and Goldberger 2012)\n    * Cut Glue \u0026 Cut (Beier et al 2014)\n        * Cut Glue \u0026 Cut - QPBO \n    * Greedy Additive Clustering /  Energy based Hierarchical Clustering (Beier et al. 2015)\n    * Fusion Moves for Correlation clustering (Beier et al. 2015)\n        * Perturbed Random Seed Watershed Proposal Generator\n        * Perturbed Greedy Additive Clustering Proposal Generator\n    * Kernighan-Lin Algorithm with Joins (Keuper et al 2015)\n    * Message Passing for the Minimum Cost Multicut Problem (Swoboda 2016)\n\n* Lifted Multicut: (Andres et al. 2015, Keuper et al 2015)\n    * Kernighan-Lin Algorithm with Joins (Keuper et al 2015)\n    * Greedy Additive Clustering (Keuper et al 2015)\n    * Lifted-Multicut-Ilp (does not scale to meaningful problems, just for verification)\n        * Lifted-Multicut-Ilp-Cplex\n        * Lifted-Multicut-Ilp-Gurobi\n        * Lifted-Multicut-Ilp-Glpk\n    * Fusion Moves for Lifted Multicuts (Beier et al. 2016)\n        * Perturbed Random Seed Watershed Proposal Generator\n        * Perturbed Greedy Additive Clustering Proposal Generator\n    * Message Passing for the Minimum Cost Multicut Problem (Swoboda 2016)\n\n\n* Mincut/Maxcut:\n    * QPBO \n\n* Agglomerative Clustering\n    * Easy to extend / Custom cluster policies\n    * UCM Transform\n* CGP 2D (Cartesian Grid Partitioning)\n* Many Data Structures:\n    * Union Find Data Structure\n    * Histogram\n\n* Coming Eventually:\n    * MultiwayCut:\n    * ModifiedMultiwayCut:\n    * LiftedModifiedMultiwayCut:\n\n\n\nC++ vs Python:\n==============\nThe Python API is at present the easiest to use. The C++ API is mostly for power users.\nWe recommend to use library from Python.\nAlmost any class / function in the Python API is calling into C++ via pybind11.\n\nInstall:\n========\n\n\nConda:\n======\n\nThe easiest way to install this version is via conda (right now it is not available with gurobi or cplex, you will need to build from source for this):\n```\nconda install -c conda-forge nifty\n```\n\nFrom Source:\n============\n\nTo build nifty from source, you will need to set up an environment with all necessary dependencies.\nWe recommend to use conda for this as well and provide the file environment.yaml` for this.\nYou can set up this environment and build nifty with the following commands: \n\n```sh\n$ conda env create -f environment.yaml\n$ conda activate nifty-dev\n$ mkdir bld\n$ cd bld\n$ cmake -DCMAKE_PREFIX_PATH=/path/to/conda/envs/nifty-dev -DWITH_Z5=ON -DWITH_HDF5=ON -DWITH_ZLIB=ON -DBUILD_NIFTY_PYTHON=ON ..\n$ make\n```\n\nThis would build nifty with additional hdf5 and z5 dependencies; and add zlib support for z5.\nYou can find all build options in [CMakeLists.txt](https://github.com/DerThorsten/nifty/blob/master/CMakeLists.txt#L36-L50);\nnote that you may need to install additional dependencies.\n\n\nTroubleshooting:\n=================\n\nTODO\n\nChangelog:\n=================\n\nTODO\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderthorsten%2Fnifty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderthorsten%2Fnifty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderthorsten%2Fnifty/lists"}