Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Change 'Unspecified' to '0' for TFLite Model Maker compatibility #214

Merged
merged 2 commits into from
Oct 21, 2021

Conversation

scottamain
Copy link
Contributor

@scottamain scottamain commented Oct 19, 2021

TFLite Model Maker[1] throws a ValueError when importing PASCAL VOC data made from Make Sense because it expects certain values ("truncated" and "difficult") to be integers[2]. This PR changes those default values to zero so Model Maker will accept the XML, which seems to be the accepted pattern, as demonstrated in the VOC test datasets[3].

[1] https://www.tensorflow.org/lite/api_docs/python/tflite_model_maker/object_detector/DataLoader?hl=en#from_pascal_voc
[2] https://github.com/google/automl/blob/1.2/efficientdet/dataset/create_pascal_tfrecord.py#L170-L179
[3] http://host.robots.ox.ac.uk/pascal/VOC/voc2007/index.html#testdata

Pre-flight checklist

  • Unit tests for all non-trivial changes
  • Tested locally
  • Updated wiki

@SkalskiP
Copy link
Owner

Hello @scottamain 👋 ! Thank you for pointing that to me. I must admit when I was creating PASCAL VOC export I was not sure what is the meaning of those fields and that's why I filled them with 'Unspecified' value. I'm happy to merge that PR.

Thank you for your contribution! 💪

@SkalskiP SkalskiP merged commit 61f67a8 into SkalskiP:develop Oct 21, 2021
@SkalskiP
Copy link
Owner

One more thing. Until the next release, those changes won't affect editor on https://makesense.ai, however you can utilise them on https://develop.makesense.ai/ .

@scottamain
Copy link
Contributor Author

Great! You're very welcome. Do you have any plans for the next release?

@SkalskiP
Copy link
Owner

Unfortunately last month I got sick with Covid and work on https://makesense.ai slowed down significantly. I'm hoping to pick up the pace and do a new release in 3/4 weeks. :) If you ask about features I would be very happy if those two would be added in the next release:

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants