Hello everyone, My image is very large, so I give coordinates to represent a single picture. Each time I read out a picture based on the coordinates, does fastai ImageDataBunch support this operation?
got it
class PatchImageItemList(ImageList):
def open(self, fn:PathOrStr)->Image:
if not “#” in fn:
return super().open(fn)
filename,coords=fn.split("#")
coords=[int(c) for c in coords.split(":")]
image=image_loader(filename,coords)
return vision.Image(px=image)