示例#1
0
    def _generate_dataset(self, target_root_dir):
        tensorflow_dataset = TensorFlowDataset()

        print('Generating TensorFlow dataset for positive images.')
        if (not tensorflow_dataset.generate(
                SimpleFaceDataset.positive_file_name(target_root_dir),
                target_root_dir, 'positive')):
            print('Error generating TensorFlow dataset for positive images.')
            return (False)
        print('Generated TensorFlow dataset for positive images.')

        print('Generating TensorFlow dataset for partial images.')
        if (not tensorflow_dataset.generate(
                SimpleFaceDataset.part_file_name(target_root_dir),
                target_root_dir, 'part')):
            print('Error generating TensorFlow dataset for partial images.')
            return (False)
        print('Generated TensorFlow dataset for partial images.')

        print('Generating TensorFlow dataset for negative images.')
        if (not tensorflow_dataset.generate(
                SimpleFaceDataset.negative_file_name(target_root_dir),
                target_root_dir, 'negative')):
            print('Error generating TensorFlow dataset for negative images.')
            return (False)
        print('Generated TensorFlow dataset for negative images.')

        print('Generating TensorFlow dataset for landmark images.')
        if (not tensorflow_dataset.generate(
                self._image_list_file_name(target_root_dir), target_root_dir,
                'image_list')):
            print('Error generating TensorFlow dataset for landmark images.')
            return (False)
        print('Generated TensorFlow dataset for landmark images.')

        return (True)
示例#2
0
	def _generate_dataset(self, target_root_dir):
		tensorflow_dataset = TensorFlowDataset()
		if(not tensorflow_dataset.generate(self._image_list_file_name(target_root_dir), target_root_dir, 'image_list')):
			return(False) 

		return(True)