text_plain_output_1.png
from pathlib import Path

bs = 16

from pathlib import Path
path = Path('../input/earphones/earphone_dataset')

path.ls()

mi = path / 'redmi_airdots'
galaxy = path / 'galaxy_buds'
airpods = path / 'iphone_airpods'

mi.ls()

fn_paths = []
fn_paths = fn_paths + mi.ls() + galaxy.ls() + airpods.ls()
fn_paths

tfms = get_transforms(do_flip=False)

pat = '/([^/]*)/[^/]*.jpg$'

data = ImageDataBunch.from_name_re(path, fn_paths, pat=pat, ds_tfms=tfms, size=224, bs=bs)
data.classes