Technology Behind OnePetri
Behind the scenes, OnePetri processes your images using a local copy of the trained object detection machine learning models to detect petri dishes and plaques. Several thresholds can be set and fine-tuned to optimize model performance. Although defaults have been set in OnePetri, these can be changed by the user at any time within the app’s settings page.
From image to inference
To detect petri dishes in an image, the original image is resized (to fit within a 320px x 320px square) and then provided to the model.
When it comes to counting plaques, the original input image is first decomposed into several equisized non-overlapping smaller images/tiles (each fits within a 416px x 416px square), think of it like a puzzle, except in reverse. Then, overlapping tiles are also created, to ensure that all plaques which may have been on the tile boundaries are properly detected & counted. Finally, the tiles are individually provided to the plaque detection model and bounding boxes are drawn. Non-maximum suppression is done to remove duplicate plaques from the overlapping tile regions.
This process of tiling is key to OnePetri’s image analysis pipeline because of how small the features (plaques) are relative to the image as a whole. The machine learning models were trained on tiles of images to begin with, as training on full-resolution images would be very computationally intensive.
The confidence threshold is a measure of the model’s confidence that a given detection event (bounding box) contains the specified object (in this case, petri dish or plaque). Confidence thresholds are a real number between 0.00 and 1.00, exclusively. A lower confidence threshold may increase recall at the expense of an increased number of false positives. Conversely, a higher confidence threshold may increase the number of false negatives.
Non-maximum suppression & IOU thresholds
Object detection models such as those used in OnePetri often return several bounding boxes for a single object. To determine if these boxes represent the same object, a cutoff threshold is set. This process is termed non-maximum suppression (NMS).
The intersection over union (IOU) threshold is a measure of the area of the intersection of two bounding boxes, divided by the area of the union of both bounding boxes. As this value approaches 1, both boxes become increasingly overlapped. Bounding boxes which have an IOU above the set threshold are removed from the predictions as they likely correspond to the same object.