deepblink.datasets.spots module

SpotsDataset class.

class deepblink.datasets.spots.SpotsDataset(name: str, cell_size: int, smooth_factor: float = 1)[source]

Bases: deepblink.datasets._datasets.Dataset

Class used to load all spots data.

Parameters:
  • cell_size – Number of pixels (from original image) constituting one cell in the prediction matrix.
  • smooth_factor – Value used to weigh true cells, weighs false cells with 1-smooth_factor.
image_size

Check if all images have the same square shape.

load_data() → None[source]

Load dataset into memory.

normalize_dataset() → None[source]

Normalize all the images to have zero mean and standard deviation 1.

prepare_data() → None[source]

Convert raw labels into labels usable for training.

In the “spots” format, training labels are stored as lists of coordinates, this format cannot be used for training. Here, this format is converted into prediction matrices.