cellmap_segmentation_challenge.utils.crops#

Functions

fetch_manifest(url)

Fetch a manifest file from a URL and return a tuple of CropRow objects.

Classes

CropRow(id, dataset, alignment, gt_url, em_url)

A dataclass representing a row in the crop manifest file.

class cellmap_segmentation_challenge.utils.crops.CropRow(id: int, dataset: str, alignment: str, gt_url: URL, em_url: URL)[source]#

A dataclass representing a row in the crop manifest file.

Parameters:
  • id (int)

  • dataset (str)

  • alignment (str)

  • gt_url (URL)

  • em_url (URL)

id: int#
dataset: str#
alignment: str#
gt_url: URL#
em_url: URL#
classmethod from_csv_row(row: str) type[Self][source]#

Create a CropRow object from a CSV row.

Parameters:

row (str)

Return type:

type[Self]

cellmap_segmentation_challenge.utils.crops.fetch_manifest(url: str | URL) tuple[CropRow, ...][source]#

Fetch a manifest file from a URL and return a tuple of CropRow objects.

Parameters:

url (str or yarl.URL) – The URL to the manifest file.

Returns:

A tuple of CropRow objects.

Return type:

tuple[CropRow, …]