Skip to main content

Build Status PyPI version License

imagedataextractor is a Python library for nanoparticle electron microscopy image quantification.

Try the online Demo.

Features

  • Automatic detection and download of microscopy images from scientific articles.
  • Particle segmentation with uncertainty quantification.
  • Particle localization.
  • Automatic scalebar detection (reading and measurement).
  • Particle size distributions.
  • Locations, sizes and aspect ratios of all particles in an image (in the form of a .csv file).
  • Radial distribution functions of extracted particle systems.

Installation

imagedataextractor requires Python 3.7 or above. We strongly recommend the use of a virtual environment for installation, as imagedataextractor requires specific versions of its requirements to be installed in order to function as intended.

Install Tesseract

imagedataextractor requires Tesseract 4. Installation instructions for Tesseract can be found here. On Linux, this is very simple:

sudo apt-get install tesseract-ocr libtesseract-dev

Installation with pip (recommended)

pip install imagedataextractor

Installation from source

  1. Clone the repo and move into the directory:
git clone https://github.com/by256/imagedataextractor.git
cd imagedataextractor
  1. Activate your virtual environment.

  2. Install:

python setup.py install

Usage

Simply provide as input a path to an image or a document, or a path to a directory of images and/or documents.

import imagedataextractor as ide

image_path = '<path/to/image>'
data = ide.extract(image_path)

# view extracted data as a pandas DataFrame
df = data.to_pandas()

# retrieve extracted scalebar data
sb_text = data.scalebar.text
conversion = data.scalebar.conversion  # pixels to meters

# resulting particle segmentations
seg = data.segmentation

If the input image is a figure containing a panel of images, these will be split and extraction will be performed on each sub-image separately.

See the example notebook. A more detailed usage guide can be found in the Documentation.

Citing

If you use imagedataextractor in your work, please cite the following works:

B. Yildirim, J. M. Cole, "Bayesian Particle Instance Segmentation for Electron Microscopy Image Quantification", J. Chem. Inf. Model. (2021) https://doi.org/10.1021/acs.jcim.0c01455

K. T. Mukaddem, E. J. Beard, B. Yildirim, J. M. Cole, "ImageDataExtractor: A Tool to Extract and Quantify Data from Microscopy Images", J. Chem. Inf. Model. (2019) https://doi.org/10.1021/acs.jcim.9b00734

Funding

This project was financially supported by the Science and Technology Facilities Council (STFC) and the Royal Academy of Engineering (RCSRF1819\7\10).

License

License

Release files for imagedataextractor 2.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for imagedataextractor 2.0.4
File Size Uploaded
imagedataextractor-2.0.4.tar.gz 18.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for imagedataextractor 2.0.4
File Interpreter ABI Platform
imagedataextractor-2.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 98.3 MB

Release files / imagedataextractor-2.0.4.tar.gz

Download URL imagedataextractor-2.0.4.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
06dda546b3429f865d22045c0ac49743e3eb8675740e24c264358b974bf87b8e
BLAKE2b-256 checksum
How to use checksums
0b38e79587af3a6bcf430b4afcc36e97c9054ec0619132143a55684c6c6e47e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.7.0 requests/2.25.1 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.4

Release files / imagedataextractor-2.0.4-py3-none-any.whl

Download URL imagedataextractor-2.0.4-py3-none-any.whl
Size 98.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f77270e47fe1994f663d204fad923afa7719b635030605483668569306ea304a
BLAKE2b-256 checksum
How to use checksums
91a85e65e7396cf879da8206d3fc7e789fb6b4871f9666296fcd003f726bac44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.7.0 requests/2.25.1 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.4

Release history Release notifications | RSS feed

This release

2.0.4 This release

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

4 release files

1.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page