Skip to content

Measure Image Focus

bethac07 edited this page May 3, 2018 · 9 revisions

CellProfiler Microscope Image Focus Module Instructions

The implementation of this plugin is described in and the URL for this page is linked from this paper:

Yang, S. J., Berndl, M., Ando, D. M., Barch, M., Narayanaswamy, A. , Christiansen, E., Hoyer, S., Roat, C., Hung, J., Rueden, C. T., Shankar, A., Finkbeiner, S., & and Nelson, P. (2018). Assessing microscope image focus quality with deep learning. BMC Bioinformatics, 19(1). [PDF]

Install

OS X

From source (recommended)

  1. Install CellProfiler from source Using a terminal (found in Applications) and by running given commands in command line (instructions)

  2. Get CellProfiler Plugin. In the terminal, run these commands:

MYDIR=/tmp/; cd MYDIR
git clone https://github.com/CellProfiler/CellProfiler-plugins.git 
cd CellProfiler-plugins/
  1. Install dependencies. In the terminal, run
pip install -r requirements.txt
  1. To run CellProfiler, in the terminal run the following; note you may get import errors, but these can be safely ignored:
cellprofiler --plugins-directory MYDIR/CellProfiler-plugins

From DMG

Not yet supported.

Windows

Not yet supported because the only Tensorflow package available on Windows uses Python 3.

Usage

  1. In CellProfiler, Click "Images" and drag in images of interest [1]
  2. Edit > Add Module > Measurement > MeasureImageFocus
  3. Click on the module and in the module window choose Image > DNA (or name of image of interest)
  4. To test module on a single image, click “Test Mode” and then click the step button or
  5. "Analyze Images" to run module on all images

Note: the first time it's run, this module needs to download the model/weights, which can take a while.

[1] Download the test images from https://storage.googleapis.com/microscope-image-quality/static/fiji_plugin_test_images.zip. These images were excluded from the train dataset; the 6 focus examples were randomly selected and the other 2 examples show special cases.