mtbsteve / redtail

NVidia Redtail project with ArduPilot Support for Jetpack 4.2.x
BSD 3-Clause "New" or "Revised" License
66 stars 17 forks source link

tensorflow model for steroDNN #10

Open rodrigoGA opened 3 years ago

rodrigoGA commented 3 years ago

How to restore the DNN stero model to test it?

I am doing it from google colab and this is what I do:

%tensorflow_version 1.x
!git clone https://github.com/mtbsteve/redtail

with tf.Session() as sess:
  new_saver = tf.train.import_meta_graph('./redtail/stereoDNN/models/ResNet-18_2D/TensorFlow/model-inference-513x257-0.meta')
  new_saver.restore(sess, tf.train.latest_checkpoint('./redtail/stereoDNN/models/ResNet-18_2D/TensorFlow/'))
  print(sess.run('w1:0'))

Throws the following error when run restore: ValueError: Can't load save_path when it is None. According to an internet search it is due to the absence of checkpoint files in the folder.

Can you share the file with the checkpoints or the model in Keras '.h5' format?