Hi, I originally uploaded PNG images to my dataset, but when I exported it, the images were converted to JPGs. I want to train my own model using PNGs instead, so I’m planning to convert the exported JPGs back to PNGs, but there are a few things I’m unsure about:
Will my annotations still be applied if I just convert the images back to PNGs? (Assuming the filenames and sizes stay the same.)
Is there any way to get back the original image quality that was lost when the PNGs were first turned into JPGs? Or is that permanent?
What’s the best way to keep everything in PNG format while keeping the annotations valid?
COCO format annotations reference .jpg files by default, so if you’ve converted your images to .png, you’ll need to update the .json annotation file accordingly. Specifically, change all ".jpg" extensions to ".png" in the file_name fields within the JSON to ensure annotations apply correctly.
If you’re looking to download the original quality image, you can do so by clicking on a image on your dataset’s and selecting “Download Image”. If you’re looking to download your entire dataset original quality images, you can do so by using the Image Search API. Further details available in our Export a Dataset Version documentation.
To maintain .png format with valid annotations, follow both steps above:
Download the original PNG images
Update the .json file to reference .png instead of .jpg