douglasrizzo / detection_util_scripts

TF and YOLO utility scripts
MIT License
50 stars 37 forks source link

Modified generate_tfrecord.py to use with TF2 #3

Closed shanejohnpaul closed 4 years ago

douglasrizzo commented 4 years ago

Thanks for the contribution. Can you tell me if TFRecords generated with one version of TensorFlow work with the other?

shanejohnpaul commented 4 years ago

TFRecords should be the same regardless of the version. In fact, the changes are using TF1's functions. Still, I'm not completely sure though.

I have completely switched over to Tensorflow v2. And some of these functions are moved to different locations in TF2. And that's all the changes I made.

I think the same exact code will work with TF1 too since it also has these functions (tf.compat.v1 and tf.io.gfile). I haven't checked generate_yolo_txt.py and generate_train_eval.py for compatibility with TF1.

douglasrizzo commented 4 years ago

I believe only generate_tfrecord.py actually uses TensorFlow. I will have a project with some object detection coming soon. I'll test your contribution then and merge as soon as possible.

shanejohnpaul commented 4 years ago

Nice!