def _build_pcollection(self, pipeline, paths, split):
    beam = tfds.core.lazy_imports.apache_beam
    import tensorflow_datasets.object_detection.open_images_challenge2019_beam as oi_beam
    if (split == 'test'):
        generate_examples_kwargs = dict(image_labels_filepath=None, box_labels_filepath=None, hierarchy_filepath=None, classes_filepath=None)
    else:
        generate_examples_kwargs = dict(image_labels_filepath=paths['{}_image_label'.format(split)], box_labels_filepath=paths['{}_boxes'.format(split)], hierarchy_filepath=paths['hierarchy'], classes_filepath=paths['classes'])
    oi_beam.fill_class_names_in_tfds_info(paths['classes'], self.info.features)
    return ((((pipeline | beam.Create(paths['{}_images'.format(split)])) | ('ReadImages' >> beam.ParDo(oi_beam.ReadZipFn()))) | ('ProcessImages' >> beam.ParDo(oi_beam.ProcessImageFn(target_pixels=self.builder_config.target_pixels, jpeg_quality=72)))) | ('GenerateExamples' >> beam.ParDo(oi_beam.CreateDetectionExampleFn(**generate_examples_kwargs))))
def _build_pcollection(self, pipeline, paths, split):
    beam = tfds.core.lazy_imports.apache_beam
    import tensorflow_datasets.object_detection.open_images_challenge2019_beam as oi_beam
    if (split == 'test'):
        generate_examples_kwargs = dict(image_labels_filepath=None, box_labels_filepath=None, hierarchy_filepath=None, classes_filepath=None)
    else:
        generate_examples_kwargs = dict(image_labels_filepath=paths['{}_image_label'.format(split)], box_labels_filepath=paths['{}_boxes'.format(split)], hierarchy_filepath=paths['hierarchy'], classes_filepath=paths['classes'])
    oi_beam.fill_class_names_in_tfds_info(paths['classes'], self.info.features)
    return ((((pipeline | beam.Create(paths['{}_images'.format(split)])) | ('ReadImages' >> beam.ParDo(oi_beam.ReadZipFn()))) | ('ProcessImages' >> beam.ParDo(oi_beam.ProcessImageFn(target_pixels=self.builder_config.target_pixels, jpeg_quality=72)))) | ('GenerateExamples' >> beam.ParDo(oi_beam.CreateDetectionExampleFn(**generate_examples_kwargs))))