deepblink.datasets package¶
Module contents¶
Datasets module with classes to handle data import and data presentation for training.
-
class
deepblink.datasets.
Dataset
(name: str, *_)[source]¶ Bases:
object
Simple abstract class for datasets.
Parameters: name – Absolute path to dataset file. -
data_filename
¶ Return the absolute path to the dataset.
-
-
class
deepblink.datasets.
SequenceDataset
(x: numpy.ndarray, y: numpy.ndarray, batch_size: int = 16, augment_fn: Callable = None, format_fn: Callable = None, overfit: bool = False)[source]¶ Bases:
keras.utils.data_utils.Sequence
Custom Sequence class used to feed data into model.fit.
Parameters: - x_list – List of inputs.
- y_list – List of targets.
- batch_size – Size of one mini-batch.
- augment_fn – Function to augment one mini-batch of x and y.
- format_fn – Function to format raw data to model input.
- overfit – If only one batch should be used thereby causing overfitting.
-
class
deepblink.datasets.
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.