Beispiel #1
0
 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)
Beispiel #2
0
 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)