Download results and reports

You can download nearly everything Biodock generates for you in the Results Dashboard.

Downloading out an aggregate report

You should download the aggregate report when you want to compare across images or experimental groups on a mean/std. dev basis.

Click on the Download data dropdown on the top right of the Results Dashboard. This will have a dropdown - select Download aggregate data. This will process, and then ping you with a notification shortly with a download link for a CSV file that contains a report with one line per group as well as per image.

Downloading out a per-object CSV

You should download the per-object CSV when you need object-by-object data, either to import into another program, do downstream analysis, or look at specific objects.

Click on the Download data dropdown on the top right of the Results Dashboard. This will have a dropdown - select Generate CSV. This will process, and then ping you with a notification shortly with a download link for a CSV file that contains extracted metrics for every object within the whole run, represented by each row.

These CSVs can get very large, and take several minutes to run if you have hundreds of thousands or millions of objects (one row per object). Consider downloading the aggregate report instead.

Downloading plots

The scatter, histogram, and aggregate plot can all be downloaded by hovering over and hitting the camera icon. This will download a .png.

Downloading out AI-generated object masks

You may want to download out raw masks to create your own overlay visualizations, generate custom metrics, or do any sort of miscellaneous processing.

Click on the Download data dropdown on the Top-level widget in the Results Dashboard. This will have a dropdown - select Generate masks data. This mask data will be downloaded in a compact zip archive containing JSON files that can be parsed with scripts and used for further computational analysis. The format of the archive is as follows:

|- index.json  # pipeline run meta information
|- {image_id}_objects.json  # for each image in the run
image.json
{
  "resultId": "AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAA",
  "dateRun": "2022-08-08T19:03:06.458Z",
  "classData": {
      "Cyst": {
        "name": "Cyst",
        "type": "Instance"
      }
    }
}
{image_id}_objects.json
{
    "filename": "file1.tif",
    "id": "AAAAAAAAAAAAAAAAAAAAAAAA",
    "height": 12288,
    "width": 16384,
    "objects": {
        "1": {
            "bbox": [ 250, 474, 437, 664 ],    // x1, y1, x2, y2
            "id": 1,
            "rle": {                           // RLE-encoded object, use <> to decode
                "size": [ 190, 187 ],
                "counts": "WWUwOFo1YTBLMEk7RDlGPE0w="
            },
            "pred_class": "Cyst",
            "derived_objects": {}
        }
    }
}

Processing Biodock output masks

Biodock output masks are encoded in a COCO-style RLE format. You can use cocoapi tools in Python, Lua, or Matlab to parse them easily. Some basic examples are below in Python - check out the Github repo for further documentation or for other languages

Installing pycocotools

pip install pycocotools # or conda install -c conda-forge pycocotools

Parsing Biodock output masks for an image into an array of binary masks

import base64
import json
import pycocotools.mask as maskutil

with open('AAA_objects.json') as maskfile:
  mask_results = json.load(maskfile)
  first_image_objects_encoded = mask_results["objects"]

  first_image_masks = []
  for obj in first_image_objects_encoded.values():
      encoded_mask = obj["rle"]
      encoded_mask["counts"] = base64.b64decode(encoded_mask["counts"])

      first_image_masks.append(maskutil.decode(encoded_mask))

You can then convert these binary masks into polygons using a number of different libraries, and then, for example into FIJI using the ROI importer

Downloading high-resolution overlay images

Last updated