<commit_before>[![Coverage Status](https://coveralls.io/repos/github/mjirik/imcut/badge.svg?branch=master)](https://coveralls.io/github/mjirik/imcut?branch=master)

About
-----

Segmentation tools based on the graph cut algorithm. You can 
see video to get an idea. There are two algorithms implemented. 
Classic 3D Graph-Cut with regular grid and [Multiscale Graph-Cut for segmentation of compact objects](https://github.com/mjirik/imcut/blob/master/examples/pycut_multiresolution.ipynb).

[![Graph-Cut segmentation](https://img.youtube.com/vi/bFSyY4jyMHw/0.jpg)](https://www.youtube.com/watch?v=bFSyY4jyMHw)

please cite:

    @INPROCEEDINGS{jirik2013,
        author = {<NAME> <NAME> <NAME> <NAME>.},
        title = {Image Segmentation in Medical Imaging via Graph-Cuts.},
        year = {2013},
        journal = {11th International Conference on Pattern Recognition and Image Analysis: New Information Technologies (PRIA-11-2013). Samara, Conference Proceedings },
        url = {http://www.kky.zcu.cz/en/publications/JirikMmjirik_2013_ImageSegmentationin},
    }




Authors
-------

* <NAME>
* <NAME>

Special requirements
-----

See third party licenses

 * [gco_python](https://github.com/amueller/gco_python)
 * [gco-v3.0](http://vision.csd.uwo.ca/code/gco-v3.0.zip) 

Resources
-----

  https://github.com/mjirik/imcut
  
  https://github.com/amueller/gco_python


License
-------

New BSD License, see the LICENSE file.

Install with conda
----

    conda install -c mjirik -c conda-forge imcut pygco


Sometimes (on Linux) you will need to install `pygco` with pip

    conda install pip
    pip install pygco

Install with pip
-------

    pip install pygco imcut

See [INSTALL.md](INSTALL.md) file for more information


# Examples

## Run with CLI


Create output.mat file:
    
    python imcut/dcmreaddata.py -i directoryWithDicomFiles --degrad 4
    
See data:

    python imcut/seed_editor_qt.py -f output.mat
    
Make graph_cut:
<commit_msg>additional packages<commit_after>[![Coverage Status](https://coveralls.io/repos/github/mjirik/imcut/badge.svg?branch=master)](https://coveralls.io/github/mjirik/imcut?branch=master)

About
-----

Segmentation tools based on the graph cut algorithm. You can 
see video to get an idea. There are two algorithms implemented. 
Classic 3D Graph-Cut with regular grid and [Multiscale Graph-Cut for segmentation of compact objects](https://github.com/mjirik/imcut/blob/master/examples/pycut_multiresolution.ipynb).

[![Graph-Cut segmentation](https://img.youtube.com/vi/bFSyY4jyMHw/0.jpg)](https://www.youtube.com/watch?v=bFSyY4jyMHw)

please cite:

    @INPROCEEDINGS{jirik2013,
        author = {<NAME>. and <NAME>. and <NAME>. and <NAME>.},
        title = {Image Segmentation in Medical Imaging via Graph-Cuts.},
        year = {2013},
        journal = {11th International Conference on Pattern Recognition and Image Analysis: New Information Technologies (PRIA-11-2013). Samara, Conference Proceedings },
        url = {http://www.kky.zcu.cz/en/publications/JirikMmjirik_2013_ImageSegmentationin},
    }




Authors
-------

* <NAME>
* <NAME>

Special requirements
-----

See third party licenses

 * [gco_python](https://github.com/amueller/gco_python)
 * [gco-v3.0](http://vision.csd.uwo.ca/code/gco-v3.0.zip) 

Resources
-----

  https://github.com/mjirik/imcut
  
  https://github.com/amueller/gco_python


License
-------

New BSD License, see the LICENSE file.

Install with conda
----

    conda install -c mjirik -c conda-forge imcut pygco


Sometimes (on Linux) you will need to install `pygco` with pip

    conda install pip
    pip install pygco

Install with pip
-------

    pip install pygco imcut

See [INSTALL.md](INSTALL.md) file for more information

# Additional packages

```
conda install -c mjirik -c conda-forge seededitorqt
```


# Examples

## Run with CLI


Create output.mat file:
    
    python imcut/dcmreaddata.py -i directoryWithDicomFiles --degrad 4
    
See data:

    python imcut/seed_editor_qt.py -f output.mat
    
Make graph_cut:

{'fraction_non_alphanumeric': 0.12769650384329284, 'fraction_numerical': 0.014381353830895116, 'mean_word_length': 3.3236870310825295, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 16, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3535358', 'n_tokens_mistral': 1460, 'n_tokens_neox': 1335, 'n_words': 335}