Data augmentation visualization in v1

#1

How can we visualize applied data augmentation on training/valid data as mentioned in notebook dl2/pascal.ipynb in v1?

idx=3
fig,axes = plt.subplots(3,3, figsize=(9,9))
for i,ax in enumerate(axes.flat):
x,y=next(iter(md.aug_dl))
ima=md.val_ds.denorm(to_np(x))[idx]
b = bb_hw(to_np(y[idx]))
print(b)
show_img(ima, ax=ax)
draw_rect(ax, b)
0 Likes

(Sanyam Bhutani) #2

@tamhash This might help, although I’ve most borrowed code from the docs.

1 Like

#3

Thank you @init_27. Kaggle notebook is awesome.

1 Like