def Demo(self): import glob from utils import run_fromfile img_files = sorted(glob.glob('imgs/*.jpg')) for img in img_files: run_fromfile(self.model, img, self.opts.cuda, self.val_loader.dataset.transforms)
def Test(self): from utils import run_fromfile for image, label in self.val_loader: run_fromfile(self.model, image, self.opts.cuda, self.val_loader.dataset.untransform, val=True)