Skip to content

CFUCounter, an application that counts colony-forming units in images of petri dishes.

License

Notifications You must be signed in to change notification settings

dedovskaya/CFUCounter

Repository files navigation

CFUCounter

An application that counts colony-forming units in images of petri dishes. CFU Counter uses Mask R-CNN which is a state-of-the-art model for instance segmentation, developed on top of Faster R-CNN. The CNN was trained using the Agar dataset.

Mask R-CNN: https://github.com/matterport/Mask_RCNN

Agar Dataset: https://agar.neurosys.com/

Instructions:

  1. Download .h5 file from this link: https://drive.google.com/file/d/19-mxrjV_EeSQAb7SppIVG_vgjse_pP7u/view?usp=sharing
  2. Put .h5 file to "agar_cfg20221010T2320" folder
  3. Create an environment with Python 3.6.3 and install dependencies with the following commands in terminal/powershell:
    1. conda create -n agarrcnn python=3.6.3
    2. conda activate agarrcnn
    3. pip install -r requirements.txt

To run the application:

python cfucounter.py

Upload a file

  • To upload a single image use the "Upload File" button.

  • To upload all images from a folder use the "Upload Folder" button.

Set configurations

  1. Set Number of Samples, the maximum number of final detections. If you don't know the estimated number of colonies, leave this number high.

  2. Set Detection Confidence, minimum probability value to accept a detected instance. ROIs below this threshold are skipped. For the best results raise its value to 0.99. If you have a vague picture and you think that the application underestimates the number of colonies you can leave the default number or decrease it.

  3. Or just leave the default parameters.

Hint: you can run the detection multiple times on the same image with different configuration parameters. All the input configuration parameters are saved in the output .csv table.

Run Detection

  • Click "Detect selected" to detect colonies on the displayed image. The detection will be performed on the picture that is shown in the main window. To change the picture use arrow buttons near thumbnails of images.

  • Click "Detect all" to detect colonies in all the uploaded images.

Export results

  • Click "Export csv table" after the detection process to save a table containing information: img name, number of colonies, bounding boxes (rectangles that surround colonies, that specify their position).

    Please always export the table before closing the application!

  • Filename Number of colonies Bounding boxes conf_numsamples conf_det_confidence Colonies per sector
    Filename Number of detected colonies Coordinates of colonies as boxes Max. number of samples Min. detection confidence Number of colonies in each sector

    Sectors represent certain areas of the petri dish:

  • Click "Export image" to save displayed image.

Information

Progress bar shows percentage-wise progress of a current detection process. For a large number of images, it does not update itself consistently.

In the bottom part of the application there is log window capturing all the events.

Author

Ekaterina Baikova, TU Graz, 2022

About

CFUCounter, an application that counts colony-forming units in images of petri dishes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published