ImageCleaner in fastai v2


I’m new here (sorry, I if this is the wrong category).
In fastai v1 I could do the following:

        from fastai.basics import *
        from import *
        from import models
        from import *
        from fastai.metrics import error_rate,accuracy
        from fastai.widgets import *
        from import *

        dataset = ImageDataBunch.from_folder(data_dir,

        classifier = cnn_learner(dataset, models.squeezenet1_1, metrics=(error_rate,accuracy))


        ds,idxs= DatasetFormatter().from_toplosses(learn)

So basically, I want to be able to clean my images and remove potentially unwanted images from my dataset. I want the images with the highest loss to be shown first.
I can’t seem to find neither DatasetFormatter, nor ImageDataBunch in fastai v2. How can I achieve this behavior in fastai v2? I searched for hours but did not find anything…

Bonus: Can I use my PyTorch-model and my PyTorch-dataset (or DataLoaders) without having to load them in again and train a completely fresh model?