LiuLimingCode / HFNet_SLAM

HFNet-SLAM: An accurate and real-time monocular SLAM system with deep features
79 stars 15 forks source link

tensorflow2 打开模型失败 #2

Closed SHUNLU-1 closed 1 year ago

SHUNLU-1 commented 1 year ago

hello,非常感谢你的贡献,我在使用你的code时,使用tensorflow(2.7)调用hfnet model会有下面错误:

Status: fail: NOT_FOUND: Op type not registered 'Resampler' in binary running on shunlu-BATTLE-AX-B560M-D-PRO. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) tf.contrib.resampler should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.. Took 17283 microseconds.

在tensorflow2中tf.contrib.resampler这个操作如何实现,请问一下你是如何使用的? 期待你的回复。

LiuLimingCode commented 1 year ago

你好,因为你使用的是官方的HF-Net模型,这个模型只支持tensorflow1,你应该使用hfnet/export_model.py来修改官方模型,这个脚本会删除模型中的resampler部分,使得模型能够在tensorflow2中运行。

相关的README.md我已经在写了。

SHUNLU-1 commented 1 year ago

非常感谢你的帮助