Request for colab tensorflow lite model maker to support .png file format

Request for colab tensorflow lite model maker to support .png file format as current colab tensorflow lite model make only support .jpg as image file format for model training

below are the exception messages

/usr/local/lib/python3.7/dist-packages/tensorflow_examples/lite/model_maker/third_party/efficientdet/dataset/create_pascal_tfrecord.py in dict_to_tf_example(data, images_dir, label_map_dict, unique_id, ignore_difficult_instances, ann_json_dict)
132 image = PIL.Image.open(encoded_jpg_io)
133 if image.format != ‘JPEG’:
→ 134 raise ValueError(‘Image format not JPEG’)
135 key = hashlib.sha256(encoded_jpg).hexdigest()
136

ValueError: Image format not JPEG

Yes, this is a known feature request. A simple workaround is to convert PNG to JPG and use them for modelmaker object detector.

Please refer to the sample code snippet

#importing the required package
from PIL import Image

#open image in png format
img_png = Image.open('C:\gfg\img.png')

#The image object is used to save the image in jpg format
img_png.save('C:\gfg\modified_img.jpg')