Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Commit

Permalink
final TMI paper (#48)
Browse files Browse the repository at this point in the history
* add stain stats @ipynb
* add references
* update Travis
* simple docs
  • Loading branch information
Borda authored Apr 9, 2020
1 parent f9b62fb commit 087e677
Show file tree
Hide file tree
Showing 8 changed files with 1,155 additions and 176 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ env:
- DISPLAY=""

matrix:
# https://blog.travis-ci.com/2019-08-07-extensive-python-testing-on-travis-ci
# https://docs.travis-ci.com/user/languages/python/
include:
- os: linux
language: python
Expand Down Expand Up @@ -54,14 +56,16 @@ matrix:
#before_script:
# - git lfs install
# - git lfs pull
# https://blog.travis-ci.com/2019-08-07-extensive-python-testing-on-travis-ci
# https://docs.travis-ci.com/user/languages/python/
- os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows
# https://github.com/skvark/opencv-python/issues/263
before_install:
- choco install python --version 3.7.0
- choco install -y python --version 3.7.0
- python -m pip install --upgrade pip
env: PATH=/c/Python37:/c/Python37/Scripts:%OPENCV_DIR%/bin:$PATH
- choco install -y opencv
env:
- TOXENV=py37
- PATH=/c/Python37:/c/Python37/Scripts:%OPENCV_DIR%/bin:$PATH
# https://towardsdatascience.com/extensive-python-testing-on-travis-ci-4c24db9bf961
allow_failures:
- os: osx
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ The project is using the standard [BSD license](http://opensource.org/licenses/B
For complete references see [bibtex](docs/references.bib).
1. Borovec, J., Munoz-Barrutia, A., & Kybic, J. (2018). **[Benchmarking of image registration methods for differently stained histological slides](https://www.researchgate.net/publication/325019076_Benchmarking_of_image_registration_methods_for_differently_stained_histological_slides)**. In IEEE International Conference on Image Processing (ICIP) (pp. 3368–3372), Athens. [DOI: 10.1109/ICIP.2018.8451040](https://doi.org/10.1109/ICIP.2018.8451040)
2. Borovec, J. (2019). BIRL: **Benchmark on Image Registration methods with Landmark validation**. arXiv preprint [arXiv:1912.13452.](https://arxiv.org/abs/1912.13452)
2. Borovec, J. (2019). **[BIRL: Benchmark on Image Registration methods with Landmark validation](https://www.researchgate.net/publication/338291737_BIRL_Benchmark_on_Image_Registration_methods_with_Landmark_validation)**. arXiv preprint [arXiv:1912.13452](https://arxiv.org/abs/1912.13452).
3. Borovec, J., Kybic, J., et al. (2020). **[ANHIR: Automatic Non-rigid Histological Image Registration Challenge](https://ieeexplore.ieee.org/document/9058666)**. In IEEE Transaction on Medical Imaging (TMI). [DOI: 10.1109/TMI.2020.2986331](https://www.doi.org/10.1109/TMI.2020.2986331)
## Appendix - Useful information
Expand Down
17 changes: 12 additions & 5 deletions birl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
"""
Using the try/except import since the init is called in setup to get pkg info
before satisfying install requirements
Expand All @@ -17,7 +18,7 @@
__author_email__ = "[email protected]"
__license__ = "BSD 3-clause"
__homepage__ = "https://borda.github.io/BIRL",
__copyright__ = "Copyright (c) 2014-2019, %s." % __author__
__copyright__ = "Copyright (c) 2014-2020, %s." % __author__
__doc__ = 'BIRL: Benchmark on Image Registration methods with Landmark validation'
__long_doc__ = "# %s" % __doc__ + """
Expand All @@ -35,8 +36,14 @@
* rerun evaluation and visualisation for finished experiments
## References
Borovec, J., Munoz-Barrutia, A., & Kybic, J. (2018). Benchmarking of image
registration methods for differently stained histological slides.
In IEEE International Conference on Image Processing (ICIP) (pp. 3368-3372),
Athens. DOI: 10.1109/ICIP.2018.8451040
1. Borovec, J., Munoz-Barrutia, A., & Kybic, J. (2018).
Benchmarking of image registration methods for differently stained histological slides.
In IEEE International Conference on Image Processing (ICIP) (pp. 3368–3372), Athens.
DOI: 10.1109/ICIP.2018.8451040
2. Borovec, J. (2019). BIRL: Benchmark on Image Registration methods with Landmark validation.
arXiv preprint arXiv:1912.13452.
3. Borovec, J., Kybic, J., et al. (2020).
ANHIR: Automatic Non-rigid Histological Image Registration Challenge.
In IEEE Transaction on Medical Imaging (TMI).
DOI: 10.1109/TMI.2020.2986331
"""
9 changes: 5 additions & 4 deletions birl/utilities/experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ def exec_commands(commands, path_logger=None, timeout=None):
# Process = NoDaemonProcess


def iterate_mproc_map(wrap_func, iterate_vals, nb_workers=CPU_COUNT, desc=''):
def iterate_mproc_map(wrap_func, iterate_vals, nb_workers=CPU_COUNT, desc='', ordered=True):
""" create a multi-porocessing pool and execute a wrapped function in separate process
:param func wrap_func: function which will be excited in the iterations
Expand All @@ -517,6 +517,7 @@ def iterate_mproc_map(wrap_func, iterate_vals, nb_workers=CPU_COUNT, desc=''):
:param int nb_workers: number og jobs running in parallel
:param str|None desc: description for the bar,
if it is set None, bar is suppressed
:param bool ordered: whether enforce ordering in the parallelism
Waiting reply on:
Expand All @@ -531,9 +532,9 @@ def iterate_mproc_map(wrap_func, iterate_vals, nb_workers=CPU_COUNT, desc=''):
* http://mindcache.me/2015/08/09/python-multiprocessing-module-daemonic-processes-are-not-allowed-to-have-children.html
* https://medium.com/@bfortuner/python-multithreading-vs-multiprocessing-73072ce5600b
>>> list(iterate_mproc_map(np.sqrt, range(5), nb_workers=1)) # doctest: +ELLIPSIS
>>> list(iterate_mproc_map(np.sqrt, range(5), nb_workers=1, desc=None)) # doctest: +ELLIPSIS
[0.0, 1.0, 1.41..., 1.73..., 2.0]
>>> list(iterate_mproc_map(sum, [[0, 1]] * 5, nb_workers=2, desc=None))
>>> list(iterate_mproc_map(sum, [[0, 1]] * 5, nb_workers=2, ordered=False))
[1, 1, 1, 1, 1]
>>> list(iterate_mproc_map(max, [(2, 1)] * 5, nb_workers=2, desc=''))
[2, 2, 2, 2, 2]
Expand All @@ -558,7 +559,7 @@ def iterate_mproc_map(wrap_func, iterate_vals, nb_workers=CPU_COUNT, desc=''):
# pool = NonDaemonPool(nb_workers)
pool = ProcessPool(nb_workers)
# pool = Pool(nb_workers)
mapping = pool.imap
mapping = pool.imap if ordered else pool.uimap
else:
logging.debug('perform sequential')
pool = None
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ references:
# sphinx-apidoc -o ./docs/source ./imsegm **/test_* --force --follow-links
cd docs
make html
make latexpdf
# make latexpdf
run_dataset: &run_dataset
run:
Expand Down
5 changes: 3 additions & 2 deletions docs/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ @inproceedings{Benchmark2018
url = {ftp://cmp.felk.cvut.cz/pub/cmp/articles/borovec/Borovec-ICIP2018.pdf https://ieeexplore.ieee.org/document/8451040/},
year = {2018}
}
@misc{BIRL2019,
@report{BIRL2019,
title={BIRL: Benchmark on Image Registration methods with Landmark validation},
author={Jiri Borovec},
year={2019},
eprint={1912.13452},
archivePrefix={arXiv},
primaryClass={cs.CV}
primaryClass={cs.CV},
ee={https://arxiv.org/abs/1912.13452},
}
6 changes: 5 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def find_source():
obj = getattr(obj, part)
fname = inspect.getsourcefile(obj)
# https://github.com/rtfd/readthedocs.org/issues/5735
if any([s in fname for s in ('readthedocs', 'checkouts')]):
if any([s in fname for s in ('readthedocs', 'rtfd', 'checkouts')]):
# /home/docs/checkouts/readthedocs.org/user_builds/birl/checkouts/
# devel/birl/utilities/cls_experiment.py#L26-L176
path_top = os.path.abspath(os.path.join('..', '..', '..'))
Expand All @@ -325,6 +325,10 @@ def find_source():
# import subprocess
# tag = subprocess.Popen(['git', 'rev-parse', 'HEAD'], stdout=subprocess.PIPE,
# universal_newlines=True).communicate()[0][:-1]
branch = filename.split('/')[0]
# do mapping from latest tags to master
branch = {'latest': 'master', 'stable': 'master'}.get(branch, branch)
filename = '/'.join([branch] + filename.split('/')[1:])
return "https://github.com/%s/%s/blob/%s" \
% (github_user, github_repo, filename)

Expand Down
Loading

0 comments on commit 087e677

Please sign in to comment.