Giter Club home page Giter Club logo

pyimagequalityranking's Introduction

PyImageQualityRanking

An Image quality ranking tool for Microscopy

PyImageQualityRanking is a small software utility that allows the ordering/sorting of image datasets, according to image-quality related statistical parameters. The software is distributed under BSD open source license.

How does it work?

The purpose of this tool is to extract image-quality related statistics from a series of images (a dataset) that can then be used to sort/rank the images according to their relative quality. Such tool could be used for example to find the highest-quality images in a dataset, or to identify and discard low-quality images. The purpose of the software is to figure out, whether certain images were clearly better than the rest in the dataset, or vice versa.

Our aim was to develop a simple tool that would not involve any complex mathematical models or training schemes – but that could still provide robust quality-related measures, that could be taken advantage of in a variety of applications. The analysis was also intended to be simple and fast, to allow its easy integration to any image-processing workflow – including real-time during-acquisition analysis.

PyImageQualityRanking software implements two kinds of parameters to rank image quality.

  1. The quality of the image histogram (contrast) is estimated by a Shannon entropy measure, that is calculated at a masked region of an image, to allow the comparison of images with varying content.
  2. The image detail is estimated in the frequency domain, by calculating a number of parameters from the power spectrum. The calculations focus on the power spectrum tail (usually >40% of max. frequency)
  3. The software also contains our implementations of two microscopy autofocus metrics that were used as comparison for our method.

How do I install it?

PyImageQualityRanking was written utilizing standard SciPy scientific libraries. The software should thus work on all the common operating systems. PyImageQualityRanking is distributed as a standard python package and it can be installed from PyPI with pip install pyimq, or from source, using the setup.py script (if you want to further develop the code).

Please refer to the Wiki page for usage examples.

Contribution guidelines

The PyImageQualityRanking is distributed under BSD open-source license. You can use the software in any way you like; we would just ask you to aknowledge our work:

Koho, S., Fazeli, E., Eriksson, J.E. & Hänninen, P.E. (2016) Image Quality Ranking Method for Microscopy. Scientific Reports, 6, 28962.

All kinds of contributions: new features, bug fixes, documentation, usage examples etc. are welcome.

Contacts

Sami Koho [email protected]

pyimagequalityranking's People

Contributors

danielsnider avatar myufa avatar sakoho81 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyimagequalityranking's Issues

TypeError when trying to run pyimq on example dataset

Hi! I am trying to run your code on the example dataset you have provided and unfortunately I am getting the following error (I'm on Linux):

My command:
pyimq.main --mode=directory --mode=analyze --working-directory=/home/bidc/Documents/mibi/Dataset_1 --file-filter=STED --use-mask --normalize-power

Error:

Mode option is ['directory', 'analyze'] Traceback (most recent call last): File "/home/bidc/anaconda3/envs/mibi/bin/pyimq.main", line 11, in <module> load_entry_point('PyImageQualityRanking==0.1', 'console_scripts', 'pyimq.main')() File "/home/bidc/anaconda3/envs/mibi/lib/python3.8/site-packages/PyImageQualityRanking-0.1-py3.8.egg/pyimq/bin/main.py", line 166, in main File "/home/bidc/anaconda3/envs/mibi/lib/python3.8/site-packages/PyImageQualityRanking-0.1-py3.8.egg/pyimq/filters.py", line 141, in set_smoothing_kernel_size TypeError: '<' not supported between instances of 'list' and 'tuple'

TypeError when defining file-filter

Hi @sakoho81, I have been testing Pyimq with your Dataset_1. While using the following command to sort data:
pyimq.main --mode=plot --working-directory=D:\Pyimq_Git\Examples\Dataset_1 --file-filter=2022-02-21_PyIQ_output\18-41-28_PyIQ_analyze_out.csv --result=average

I'm getting this error:
Traceback (most recent call last): File "C:\Users\ankit\AppData\Local\Programs\Python\Python38\Scripts\pyimq.main-script.py", line 33, in <module> sys.exit(load_entry_point('pyimq==0.1', 'console_scripts', 'pyimq.main')()) File "c:\users\ankit\appdata\local\programs\python\python38\lib\site-packages\pyimq\bin\main.py", line 236, in main file_path = os.path.join(options.working_directory, options.file) File "c:\users\ankit\appdata\local\programs\python\python38\lib\ntpath.py", line 117, in join genericpath._check_arg_types('join', path, *paths) File "c:\users\ankit\appdata\local\programs\python\python38\lib\genericpath.py", line 152, in _check_arg_types raise TypeError(f'{funcname}() argument must be str, bytes, or ' TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'

I must point out that I don't see this error when I run the whole analysis at once. I'm using Windows btw.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.