= Path("./Data")
fp
= verify_images(get_image_files(fp))
failed map(fp.unlink)
failed.
= DataBlock(
dblock =(ImageBlock, CategoryBlock),
blocks=get_image_files,
get_items=parent_label,
get_y=RandomSplitter(valid_pct=0.25),
splitter=[Resize(192, method="squish")]
item_tfms ).dataloaders(fp)
A collection of some code I find useful
After processing a set of unsorted images with this ipynb. This block of code will load the output into a datablock in fastai, handling train/valid split and formatting the images with item_tfms.