From a51436c58a3d801adde98d0e4c2d6616182ab01c Mon Sep 17 00:00:00 2001 From: Jirka Date: Sat, 16 Feb 2019 03:50:05 +0100 Subject: [PATCH] add GitHub issues/docs * add testing py3.7 * add gitter badge * update setup --- .../ISSUE_TEMPLATE/Bug_report.md | 6 ++++ .github/ISSUE_TEMPLATE/Feature_request.md | 17 +++++++++++ .travis.yml | 2 +- MANIFEST.in | 1 + README.md | 28 +++++++++-------- imsegm/utilities/__init__.py | 2 +- setup.py | 30 +++++++++++-------- 7 files changed, 59 insertions(+), 27 deletions(-) rename docs/ISSUE_TEMPLATE.md => .github/ISSUE_TEMPLATE/Bug_report.md (87%) create mode 100644 .github/ISSUE_TEMPLATE/Feature_request.md diff --git a/docs/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE/Bug_report.md similarity index 87% rename from docs/ISSUE_TEMPLATE.md rename to .github/ISSUE_TEMPLATE/Bug_report.md index 8c58a2f6..9e0eb54c 100644 --- a/docs/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -1,3 +1,9 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + ## Description [Please provide a general introduction to the issue/proposal.] diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md new file mode 100644 index 00000000..066b2d92 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.travis.yml b/.travis.yml index 89cfcd8c..e8e09e47 100755 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ python: # - 3.4 # will be deprecated for pandas - 3.5 - 3.6 - # - "3.7-dev" + - 3.7 # See http://docs.travis-ci.com/user/caching/#pip-cache cache: pip diff --git a/MANIFEST.in b/MANIFEST.in index f26771b2..999a298a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -47,6 +47,7 @@ include data_images/others/lena.png data_images/langerhans_islets/image/gtExoIsl_21.jpg prune .git +prune .github prune libs prune venv prune build diff --git a/README.md b/README.md index 41d99dd0..fbba22f1 100755 --- a/README.md +++ b/README.md @@ -3,11 +3,16 @@ [![Build Status](https://travis-ci.org/Borda/pyImSegm.svg?branch=master)](https://travis-ci.org/Borda/pyImSegm) [![codecov](https://codecov.io/gh/Borda/pyImSegm/branch/master/graph/badge.svg?token=BCvf6F5sFP)](https://codecov.io/gh/Borda/pyImSegm) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/48b7976bbe9d42bc8452f6f9e573ee70)](https://www.codacy.com/app/Borda/pyImSegm?utm_source=github.com&utm_medium=referral&utm_content=Borda/pyImSegm&utm_campaign=Badge_Grade) +[![CircleCI](https://circleci.com/gh/Borda/pyImSegm.svg?style=svg&circle-token=a30180a28ae7e490c0c0829d1549fcec9a5c59d0)](https://circleci.com/gh/Borda/pyImSegm) [![Run Status](https://api.shippable.com/projects/5962ea48a125960700c197f8/badge?branch=master)](https://app.shippable.com/github/Borda/pyImSegm) [![Coverage Badge](https://api.shippable.com/projects/5962ea48a125960700c197f8/coverageBadge?branch=master)](https://app.shippable.com/github/Borda/pyImSegm) -[![CircleCI](https://circleci.com/gh/Borda/pyImSegm.svg?style=svg&circle-token=a30180a28ae7e490c0c0829d1549fcec9a5c59d0)](https://circleci.com/gh/Borda/pyImSegm) [![CodeFactor](https://www.codefactor.io/repository/github/borda/pyimsegm/badge)](https://www.codefactor.io/repository/github/borda/pyimsegm) +[![Gitter](https://badges.gitter.im/pyImSegm/community.svg)](https://gitter.im/pyImSegm/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) + +--- ## Superpixel segmentation with GraphCut regularisation @@ -25,7 +30,7 @@ Image segmentation is widely used as an initial phase of many image processing t ![input image](figures/insitu7545.jpg) ![segmentation](figures/insitu7545_gc.png) -Borovec J., Svihlik J., Kybic J., Habart D. (2017). **Supervised and unsupervised segmentation using superpixels, model estimation, and Graph Cut.** In: Journal of Electronic Imaging. +Reference: _Borovec J., Svihlik J., Kybic J., Habart D. (2017). **Supervised and unsupervised segmentation using superpixels, model estimation, and Graph Cut.** In: Journal of Electronic Imaging._ ## Object centre detection and Ellipse approximation @@ -41,7 +46,7 @@ An image processing pipeline to detect and localize Drosophila egg chambers that ![estimated centres](figures/insitu7545_center_clusters.jpg) ![ellipse fitting](figures/insitu7545_ellipse_fit.png) -Borovec J., Kybic J., Nava R. (2017) **Detection and Localization of Drosophila Egg Chambers in Microscopy Images.** In: Machine Learning in Medical Imaging. +Reference: _Borovec J., Kybic J., Nava R. (2017) **Detection and Localization of Drosophila Egg Chambers in Microscopy Images.** In: Machine Learning in Medical Imaging._ ## Superpixel Region Growing with Shape prior @@ -57,7 +62,7 @@ Region growing is a classical image segmentation method based on hierarchical re ![growing RG](figures/insitu7545_RG2SP_animation.gif) ![ellipse fitting](figures/insitu7545_RG2SP-gc-mm.png) -Borovec J., Kybic J., Sugimoto, A. (2017). **Region growing using superpixels with learned shape prior.** In: Journal of Electronic Imaging. +Reference: _Borovec J., Kybic J., Sugimoto, A. (2017). **Region growing using superpixels with learned shape prior.** In: Journal of Electronic Imaging._ --- @@ -109,14 +114,13 @@ python setup.py install --- - ## Experiments Short description of our three sets of experiments that together compose single image processing pipeline in this order: -1. **Structure segmentation** -1. **Center detection (and ellipse fitting)** -1. **Region growing with a shape prior** +1. **Semantic (un/semi)supervised segmentation** +1. **Center detection and ellipse fitting** +1. **Region growing with the learned shape prior** ### Annotation tools @@ -142,7 +146,7 @@ We introduce some useful tools for work with image annotation and segmentation. -segs ./data_images/drosophila_ovary_slice/segm \ -out ./results/overlap_ovary_segment ``` -* **Inpainting** selected labels in segmentation. +* **In-painting** selected labels in segmentation. ```bash python handling_annotations/run_segm_annot_inpaint.py \ -imgs "./data_images/drosophila_ovary_slice/segm/*.png" \ @@ -156,7 +160,7 @@ We introduce some useful tools for work with image annotation and segmentation. ``` -### Structure segmentation +### Semantic (un/semi)supervised segmentation We utilize (un)supervised segmentation according to given training examples or some expectations. ![vusial debug](figures/visual_img_43_debug.jpg) @@ -169,7 +173,7 @@ We utilize (un)supervised segmentation according to given training examples or s --img_type 2d_split \ --slic_size 20 --slic_regul 0.25 --slico ``` -* Perform **Unsupervised** segmentation in images given in CSV +* Perform **Un-Supervised** segmentation in images given in CSV ```bash python experiments_segmentation/run_segm_slic_model_graphcut.py \ -l ./data_images/langerhans_islets/list_lang-isl_imgs-annot.csv -i "" \ @@ -193,6 +197,7 @@ We utilize (un)supervised segmentation according to given training examples or s -o ./results -n Ovary --img_type 2d_split --visual --nb_workers 2 ``` ![supervised](figures/imag-disk-20_train.jpg) +* Perform **Semi-Supervised** is using the the supervised pipeline with not fully annotated images. * For both experiment you can evaluate segmentation results. ```bash python experiments_segmentation/run_compute-stat_annot-segm.py \ @@ -332,7 +337,6 @@ pip install --user git+https://github.com/Borda/morph-snakes.git --- - ## References For complete references see [BibTex](docs/references.bib). diff --git a/imsegm/utilities/__init__.py b/imsegm/utilities/__init__.py index 84725b41..453cbf82 100644 --- a/imsegm/utilities/__init__.py +++ b/imsegm/utilities/__init__.py @@ -5,7 +5,7 @@ import pandas as pd # in case you are running on machine without display, e.g. server -if os.environ.get('DISPLAY', '') == '' and matplotlib.rcParams['backend'] != 'agg': +if not os.environ.get('DISPLAY', '') and matplotlib.rcParams['backend'] != 'agg': print('No display found. Using non-interactive Agg backend.') # https://matplotlib.org/faq/usage_faq.html matplotlib.use('Agg') diff --git a/setup.py b/setup.py index af59c71a..16977ee0 100644 --- a/setup.py +++ b/setup.py @@ -58,26 +58,27 @@ def _parse_requirements(file_path): setup( name='ImSegm', - version='0.1.4', + version='0.1.5', url='https://borda.github.io/pyImSegm', author='Jiri Borovec', author_email='jiri.borovec@fel.cvut.cz', license='BSD 3-clause', - description='superpixel image segmentation: ' - '(un)supervised, center detection, region growing', + description='superpixel image segmentation:' + ' (un)supervised, center detection, region growing', - packages=find_packages(exclude=['docs', 'notebooks', - 'handling_annotations', - 'experiments_*']), + packages=find_packages( + exclude=['docs', 'notebooks', 'handling_annotations', 'experiments_*']), cmdclass={'build_ext': BuildExt}, - ext_modules=[Extension('imsegm.features_cython', - language='c++', - sources=['imsegm/features_cython.pyx'], - extra_compile_args=['-O3', '-ffast-math', - '-march=native'], - # extra_link_args=['-fopenmp'], - )], + ext_modules=[ + Extension('imsegm.features_cython', + language='c++', + sources=['imsegm/features_cython.pyx'], + extra_compile_args=['-O3', '-ffast-math', '-march=native'], + # extra_link_args=['-fopenmp'], + ) + ], + setup_requires=setup_reqs, install_requires=install_reqs, # include_dirs = [np.get_include()], @@ -96,8 +97,11 @@ def _parse_requirements(file_path): "Natural Language :: English", "Operating System :: OS Independent", "Topic :: Scientific/Engineering :: Image Segmentation", + 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ], )