Esempio n. 1
0
 def count_images(self):
     """ Number of images or frames """
     if self.is_video:
         retval = int(count_frames(self.args.input_dir, fast=True))
     else:
         retval = len(self.input_images)
     return retval
Esempio n. 2
0
 def count(self):
     """ Number of faces or frames """
     if self._count is not None:
         return self._count
     if self.is_video:
         self._count = int(count_frames(self.folder))
     else:
         self._count = len(self.file_list_sorted)
     return self._count
Esempio n. 3
0
    def _count_images(self):
        """ Get the number of Frames from a video file or folder of images.

        Returns
        -------
        int
            The number of frames in the image source
        """
        if self._is_video:
            retval = int(count_frames(self._args.input_dir, fast=True))
        else:
            retval = len(self._input_images)
        return retval