I’m not sure if you are looking for something like this, but i managed to load image data previously saved as Tensor (could be numpy array / txt)
class CustomImageItemList(ImageItemList):
def open(self, fn):
return Image(torch.load(fn))
lst = CustomImageItemList.from_folder(Path('clean_pt'), '.pt')