# .tif Image format for segmentation and Object Detection

**URL:** <https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610>\
**Category:** 🤝  Community Help\
**Tags:** bugs, feature-request, segmentation, formats, research\
**Created:** [March 6, 2023, 11:12am UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610 "2023-03-06T11:12:08Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hamad\_Younis](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/hamad_younis/32/1353_2.png) [@Hamad\_Younis](https://discuss.roboflow.com/u/Hamad_Younis)\
**Post date:** [March 6, 2023, 11:12am UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/1 "2023-03-06T11:12:08Z")

</div>

I have the image dataset which is basically in .tif format when I am trying to upload on Roboflow app it does not support .tif format .  
I want to apply Instance Segmentation using MaskRCNN on the data  
Can anybody help me with this.

---

<div class="post-metadata">

**Author:** ![Mohamed](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/mohamed/32/62_2.png) [@Mohamed](https://discuss.roboflow.com/u/Mohamed)\
**Post date:** [March 7, 2023, 1:43am UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/2 "2023-03-07T01:43:49Z")

</div>

@Hamad_Younis you’ll need to convert the `.tif` files to `.png`

- `.png` will be best, as it will preserve the details as much as possible

From there, you’ll be able to upload - but just be sure you change the image references in the annotations files so the extensions match the new files.

Here are the formats we accept for upload, with examples on each page of the format structure: [Computer Vision Annotation Formats](https://roboflow.com/formats)

---

<div class="post-metadata">

**Author:** ![Mohamed](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/mohamed/32/62_2.png) [@Mohamed](https://discuss.roboflow.com/u/Mohamed)\
**Post date:** [March 7, 2023, 1:44am UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/3 "2023-03-07T01:44:13Z")

</div>

You can also convert to `.jpeg` prior to upload if you so choose

---

<div class="post-metadata">

**Author:** ![Hamad\_Younis](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/hamad_younis/32/1353_2.png) [@Hamad\_Younis](https://discuss.roboflow.com/u/Hamad_Younis)\
**Post date:** [March 7, 2023, 4:27am UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/4 "2023-03-07T04:27:53Z")

</div>

@Mohamed it is very large process, does your tool does not support .tif format. if not please add the feature to it.

---

<div class="post-metadata">

**Author:** ![Mohamed](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/mohamed/32/62_2.png) [@Mohamed](https://discuss.roboflow.com/u/Mohamed)\
**Post date:** [March 7, 2023, 4:35am UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/5 "2023-03-07T04:35:18Z")

</div>

It does not natively accept .tif files for upload, as the browser won’t accept that file type.

You’ll need to do the .png or .jpeg conversion method.

You can do it programmatically, too:

```auto
!pip install Pillow

from PIL import Image

import Image
im = Image.open('test.tif')
im.save('test.png')

```

Or, alternatively, an online file conversion tool, such as: [TIF to PNG Converter - FreeConvert.com](https://www.freeconvert.com/tif-to-png)

---

<div class="post-metadata">

**Author:** ![Hamad\_Younis](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/hamad_younis/32/1353_2.png) [@Hamad\_Younis](https://discuss.roboflow.com/u/Hamad_Younis)\
**Post date:** [March 7, 2023, 4:40am UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/6 "2023-03-07T04:40:18Z")

</div>

@Mohamed But main issue is the my annotation in .xml file which i have label with .tif file format.  
My machine which is real time generate .tif format files.

---

<div class="post-metadata">

**Author:** ![Mohamed](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/mohamed/32/62_2.png) [@Mohamed](https://discuss.roboflow.com/u/Mohamed)\
**Post date:** [March 7, 2023, 4:41am UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/7 "2023-03-07T04:41:42Z")

</div>

All you need to do is change the extension of the .tif in the .xml files to .png

---

<div class="post-metadata">

**Author:** ![Mohamed](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/mohamed/32/62_2.png) [@Mohamed](https://discuss.roboflow.com/u/Mohamed)\
**Post date:** [March 7, 2023, 4:42am UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/8 "2023-03-07T04:42:43Z")

</div>

Annotation files just contain records of labels, and then point to the file that the label belongs to. If the file name and extension matches, and the formatting is correct, the label is applied to the image.

---

<div class="post-metadata">

**Author:** ![Hamad\_Younis](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/hamad_younis/32/1353_2.png) [@Hamad\_Younis](https://discuss.roboflow.com/u/Hamad_Younis)\
**Post date:** [March 7, 2023, 4:45am UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/9 "2023-03-07T04:45:51Z")

</div>

@Mohamed when i change the both it does not work the annotation is change and the image is bounding box coordinate were change and the message shown is the trim the annotation in roboflow app

---

<div class="post-metadata">

**Author:** ![Mohamed](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/mohamed/32/62_2.png) [@Mohamed](https://discuss.roboflow.com/u/Mohamed)\
**Post date:** [March 7, 2023, 5:01am UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/10 "2023-03-07T05:01:59Z")

</div>

Can you file a bug report here: [GitHub - roboflow/external-bugtracker](https://github.com/roboflow/external-bugtracker)

Or, if you don’t want to post the image in a public GitHub repo, please send to [help@roboflow.com](mailto:help@roboflow.com) the screenshot of the image with trimmed annotations, the UI message, and also a screen recording of the full upload process.

---

<div class="post-metadata">

**Author:** ![Hamad\_Younis](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/hamad_younis/32/1353_2.png) [@Hamad\_Younis](https://discuss.roboflow.com/u/Hamad_Younis)\
**Post date:** [March 7, 2023, 10:14am UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/11 "2023-03-07T10:14:17Z")

</div>

@Mohamed No reply for helpcenter and github repo

---

<div class="post-metadata">

**Author:** ![Mohamed](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/mohamed/32/62_2.png) [@Mohamed](https://discuss.roboflow.com/u/Mohamed)\
**Post date:** [March 7, 2023, 1:07pm UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/12 "2023-03-07T13:07:25Z")

</div>

Hi, we typically operate in US business hours, as we’re headquartered in the US.

We will review the bug and reply.

---

<div class="post-metadata">

**Author:** ![snehit\_vaddi](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/snehit_vaddi/32/1632_2.png) [@snehit\_vaddi](https://discuss.roboflow.com/u/snehit_vaddi)\
**Post date:** [October 25, 2023, 12:36am UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/13 "2023-10-25T00:36:30Z")

</div>

Hey @Mohamed, Has his issue got resolved?  
I am also working on similar kind of problem. I have Hyper-spectral data, from that I used PCA to trim down to few bands and saved the principle components in ‘.tif’ format.  
I want to use Yolov8 model to train a custom object detection model.

---

<div class="post-metadata">

**Author:** ![leo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/leo/32/2228_2.png) [@leo](https://discuss.roboflow.com/u/leo)\
**Post date:** [October 26, 2023, 12:01am UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/14 "2023-10-26T00:01:56Z")

</div>

Hi @snehit_vaddi

Could you elaborate on the issue you’re experiencing?

> [@Hamad\_Younis](#):
>
> when i change the both it does not work the annotation is change and the image is bounding box coordinate were change and the message shown is the trim the annotation in roboflow app

Are you experiencing the same issue as this?

---

<div class="post-metadata">

**Author:** ![snehit\_vaddi](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/snehit_vaddi/32/1632_2.png) [@snehit\_vaddi](https://discuss.roboflow.com/u/snehit_vaddi)\
**Post date:** [October 26, 2023, 8:06pm UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/15 "2023-10-26T20:06:05Z")

</div>

I’m currently focusing on a project where I’ve processed hyper-spectral data through PCA, reducing it to prominent principal components and storing these in ‘.tif’ format. Now, I’m looking to advance to the next stage of my project, which involves object detection. Specifically, I’m interested in understanding if the Yolov8 model can be trained on these ‘.tif’ files containing the crucial principal components. Are there any constraints or considerations I should be aware of for effectively training a Yolov8 custom model with this kind of data?

---

<div class="post-metadata">

**Author:** ![leo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/leo/32/2228_2.png) [@leo](https://discuss.roboflow.com/u/leo)\
**Post date:** [November 1, 2023, 10:30pm UTC](https://discuss.roboflow.com/t/tif-image-format-for-segmentation-and-object-detection/1610/16 "2023-11-01T22:30:35Z")

</div>

Hi @snehit_vaddi

I’m not aware of any specific issues using `.tif` files for YOLOv8 training, but the Roboflow platform doesn’t support `.tif` files currently, so you will need to convert them.
