Beispiel #1
0
 def test_output_exists_customized_1st_image_size7(self):
     """The first image index is 2, 7 images in the output archive."""
     output_size = 7
     first_image = 2
     unarchive(self.source_archive_dir, self.output_folder_dir)
     voc_data = cut_voc(output_size, self.output_folder_dir, first_image)
     file_exists = create_archive(voc_data, self.output_archive_dir,
                                  self.output_archive_name,
                                  self.output_folder_dir)
     self.assertTrue(file_exists)
Beispiel #2
0
 def test_output_exists_default_1st_image_size4(self):
     """Default first image value, 4 images in the output archive."""
     output_size = 4
     first_image = 0
     unarchive(self.source_archive_dir, self.output_folder_dir)
     voc_data = cut_voc(output_size, self.output_folder_dir, first_image)
     file_exists = create_archive(voc_data, self.output_archive_dir,
                                  self.output_archive_name,
                                  self.output_folder_dir)
     self.assertTrue(file_exists)
Beispiel #3
0
 def test_output_exists_customized_1st_image_size98(self):
     """First image index is 1, 98 images in the output archive."""
     output_size = 98
     first_image = 1
     unarchive(self.source_archive_dir, self.output_folder_dir)
     imagenet_data = cut_imagenet(output_size, self.output_folder_dir,
                                  first_image)
     file_exists = create_archive(imagenet_data, self.output_archive_dir,
                                  self.output_archive_name,
                                  self.output_folder_dir)
     self.assertTrue(file_exists)
Beispiel #4
0
 def test_output_exists_customized_1st_image_size4(self):
     """The first image index is 1, 4 images in the output archive."""
     output_size = 4
     first_image = 1
     unarchive(self.source_images_archive_dir, self.output_folder_dir)
     unarchive(self.source_annotations_archive_dir, self.output_folder_dir)
     coco_data = cut_coco(output_size, self.output_folder_dir, first_image)
     file_exists = create_archive(coco_data, self.output_archive_dir,
                                  self.output_archive_name,
                                  self.output_folder_dir)
     self.assertTrue(file_exists)