ndsampler.abstract_sampler

Module Contents

Classes

AbstractSampler

API for Samplers, not all methods need to be implemented depending on the

class ndsampler.abstract_sampler.AbstractSampler[source]

Bases: object

API for Samplers, not all methods need to be implemented depending on the use case (for example, load_sample may not be defined if positive / negative cases are generated on the fly).

property class_ids
abstract lookup_class_name(class_id)[source]
abstract lookup_class_id(class_name)[source]
abstract load_sample(tr, pad=None, window_dims=None, visible_thresh=0.1)[source]
property n_positives
abstract load_item(index, pad=None, window_dims=None)[source]
abstract load_positive(index=None, pad=None, window_dims=None, rng=None)[source]
abstract load_negative(index=None, pad=None, window_dims=None, rng=None)[source]
abstract load_image(image_id)[source]
abstract image_ids()[source]
abstract preselect(**kwargs)[source]

Setup a pool of training examples before the epoch begins