def _read_images():
 sprites = dict()
 files = tf.gfile.Glob(tf.flags.FLAGS.data_filepattern)
 for f in files:
  image = scipy.misc.imread(f)
  m = re.search('image_([0-9]+)_([0-9]+)_([0-9]+).jpg', os.path.basename(f))
  if (m.group(1) not in sprites):
   sprites[m.group(1)] = dict()
  character = sprites[m.group(1)]
  if (m.group(2) not in character):
   character[m.group(2)] = dict()
  pose = character[m.group(2)]
  pose[int(m.group(3))] = image
 return sprites

def _read_images ( ) : sprites = dict ( ) files = tf . gfile . Glob ( tf . flags . FLAGS . data_filepattern ) for f in files : image = scipy . misc . imread ( f ) m = re . search ( 'image_([0-9]+)_([0-9]+)_([0-9]+).jpg' , os . path . basename ( f ) ) if ( m . group ( 1 ) not in sprites ) : sprites [ m . group ( 1 ) ] = dict ( ) character = sprites [ m . group ( 1 ) ] if ( m . group ( 2 ) not in character ) : character [ m . group ( 2 ) ] = dict ( ) pose = character [ m . group ( 2 ) ] pose [ int ( m . group ( 3 ) ) ] = image return sprites
read images from image files into data structure .