The main interface for this library

data_funcs

data_funcs are designed to be quick references to tell your Learner how your data is going to come in. Below is an example for grabbing images, however this should be however you expect your data to be coming in:

get_image[source]

get_image(fn, mode='RGB')

Learner

class Learner[source]

Learner(path=Path('.'), data_fn='data', model_fn='model', data_func=None, bs=16, cpu=False)

Similar to a fastai learner for inference

Params:

path: The exact path to where your data and model is stored, relative to the cwd data_fn: Filename of your pickled data model_fn: Filename of your model data_func: A function in which has the ability to grab your data based on some input. The default grabs an image in a location and opens it with Pillow bs: The batch size you are wanting to use per inference (this can be tweaked later) cpu: Whether to use the CPU or GPU

Example use:

learn = Learner('models/data', 'models/model', data_func=image_getter, bs=4, cpu=True)