1

I have a .tiff image dataset that I want to load in FiftyOne. I’ve gone through the Docs and only found Geotiff dataType so I load it as a fiftyone.types.ImageDirectory. I got: Type image/tiff may not be supported.
Came on SOF searching for a solution and came across this answer from Eric https://stackoverflow.com/a/73775999/19902725 Suggesting using a browser extension or Safari as it natively supports loading .tiff

1 - The extensions work by intercepting the URL and checking if it ends with a .TIFF so it itself could handle the request. Fiftyone loads the DS using a URL but loads the individual images in it dynamically which won’t trigger the extension to load the image. 'At least in Brave browser'
2 - Switched to Safari after giving up on the extension route but the loaded images are cropped to less than a quarter of the original image (1440 × 1080)

Any other solutions?

H A L I M
  • 13
  • 3

1 Answers1

0

An alternative is to use the newly added support for multiple media fields per sample. With this, you could generate a png or jpg for each tiff image and store these alternate filepaths on your samples in a new field, then toggle between tiff and png/jpg media in the App.

sample = fo.Sample(filepath="/path/to/img.tiff")
sample["jpg_filepath"] = "/path/to/img.jpg"
dataset.add_sample(sample)

dataset.app_config.media_fields.append("jpg_filepath")
dataset.save()  # must save after edits
Eric Hofesmann
  • 504
  • 2
  • 7
  • Thanks for the answer @Eric-hofesmann Although generating a jpg copy of a >40GB dataset seems like a waste of storage capacity. However after updating fiftyone, it seems that the original problem of the displayed cropped images on safari has now been fixed, which is great – H A L I M Sep 28 '22 at 11:02