In order to make predictions with the base model on your own data, you can either load the model through torch hub:
import torch
trainedModel = torch.hub.load("chfc-cmi", "cmr_seg_base")
or download the model file from the releases page and load it with fastai:
from fastai.vision.all import load_learner
trainedModel = load_learner("resnet34_5percent_size256_extremeTfms_ceLoss_fastai2.pkl")
The trainedModel
can directly be used to make predictions on an image file (or images loaded in python):
pred = trainedModel.predict("path/to/image.png")
predict
function and it's return values, see the fastai documentation.