def METHOD_NAME(hdf5_paths: List[Path], images_export_path: Path, labels_export_path: Path):
  bar = progressbar.ProgressBar()
  detection_data = {}
  for hdf5_path in bar(hdf5_paths):
    with h5py.File(str(hdf5_path)) as hdf5:
      rgb = np.array(hdf5['colors'])
      img = Image.fromarray(rgb)
      base_name = make_name(hdf5_path)
      img.save(images_export_path / (base_name + '.png'))
      h, w = rgb.shape[:2]
      text = np.array(hdf5['object_data']).tobytes()
      with open(labels_export_path / (base_name + '.txt'), 'w') as label_file:
        if len(text) > 0:
          object_data = json.loads(text)
          for object in object_data:
            if 'bounding_box' in object:
              bb = object['bounding_box']
              # Yolo format: [x_center, y_center, width, height]. all coordinates normalized by image dimensions
              x_center, y_center = bb[0] + bb[2] / 2, bb[1] + bb[3] / 2
              x, width = x_center / w, bb[2] / w
              y, height = y_center / h, bb[3] / h
              bb = [x, y, width, height]
              cls = object['class']
              fmt = f'{cls - 1} {x} {y} {width} {height}\n'
              label_file.write(fmt)
              if cls not in detection_data:
                detection_data[cls] = 0
              detection_data[cls] += 1
  print('Detection summary:')
  for cls in detection_data.keys():
    print(f'\tClass: {cls}\t Detection count: {detection_data[cls]}')