Closed fbiljecki closed 1 year ago
This was addressed in v0.6.0. You can now set csv_format argument like below:
# initialize the segmenter
dataset="mapillary"
task="panoptic"
segmenter = Segmenter(dataset=dataset, task=task)
# set arguments
dir_input = "path/to/input"
dir_image_output = "path/to/image_output"
dir_pixel_ratio_output = "path/to/pixel_ratio_output"
save_image_options = ["segmented_image", "blend_image"]
pixel_ratio_save_format = ["csv", "json"]
csv_format = "long" # "long" or "wide"
segmenter.segment(dir_input,
dir_image_output = dir_image_output,
dir_pixel_ratio_output = dir_pixel_ratio_output,
save_image_options = save_image_options,
pixel_ratio_save_format = pixel_ratio_save_format,
csv_format = csv_format)
Perhaps it would make downstream analyses easier than the wide format.