microsoft / VoTT

Visual Object Tagging Tool: An electron app for building end to end Object Detection Models from Images and Videos.
MIT License
4.27k stars 833 forks source link

VoTT JSON Export with "Include Images" enabled should reference the exported image, not the original #997

Open caseybrichardson opened 3 years ago

caseybrichardson commented 3 years ago

Describe the bug When exporting using the "VoTT JSON" provider, the provider exposes an option to "Include Images". Upon using this export provider though, I was surprised to find that the exported JSON still references the original files even though all the images have been copied into the export directory. This is different from issues like #752 and #762 because those are related to the actual VoTT project file (.vott), not a JSON export file.

To Reproduce Steps to reproduce the behavior (assuming you have a project with labelled data):

  1. Go to Export Settings
  2. Select the VoTT JSON provider
  3. Enable "Include Images"
  4. Save your export settings
  5. Go back to project and run an export
  6. Examine the JSON file that was output and check the path property on the assets. The path will be to the original image instead of the copied export image.

Expected behavior The expected behavior is that the exported folder is all I'd need to have for copying a project and using with another tool. Instead, I'm required to include the original asset folder and/or fix the path to the file for each asset using another script. To me, the optimal solution is for the JSON file to contain relative paths to the included images if the "Include Images" option was enabled, if not, reference the original file.

Desktop (please complete the following information):