No description, website, or topics provided.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This project aims to estimate the number of fluorescent fibres present in a UV-illuminated slide image.


After installing conda:

$ git clone
$ cd fluorescent-fibre-counting
$ conda env create --file environment
$ source activate fluorescent-fibre-counting


Counting fluorescent fibres involves:

  1. Taking an image of your slide under UV light
  2. Preprocessing the images
  3. Feeding the preprocessed images to the model

Taking images under UV light

Refer to the "taking photos of slides" guide for more details.

Preprocessing images

Once you've gotten your images (preferably in an uncompressed .tiff format):

$ source activate fluorescent-fibre-counting
$ python -m preprocess

The --min-hue and --max-hue values should be adjusted to best highlight the colour of fibre you're attempting to isolate.

For more details, see the "image preprocessing" guide

Counting fibres

To obtain an estimate of the count from pre-processed images:

$ source activate fluorescent-fibre-counting
$ python -m count <directory of preprocessed images> results.csv

Running on the GPU

Since this project uses tensorflow, it's advisable to use the GPU if you've got access to an NVIDIA graphics card. This can speed up counting fibres by a factor of ~15 (e.g. from 1m 30 per slide to ~6 seconds).

To install with GPU support:

  1. find the installation instructions for your platform from
  2. follow instructions to prepare your platform for use with tensorflow-gpu
  3. change tensorflow to tensorflow-gpu in environment.yaml
  4. initialise the environment with conda env create --file environment.yaml