伙计们,我有个问题。我可以在我的Jetson Nano上运行一个对象检测python示例。本例中为"ssh-mobilenet-v2“。它工作得很好。我还训练了自己的数据集&有一个.pb文件。如何使用它来代替"ssh-mobilenet-v2"?
import jetson.inference
import jetson.utils
net = jetson.inference.detectNet("ssd-mobilenet-v2", threshold=0.5)
camera = jetson.utils.gstCamera(1280, 720, "0") # RPIcam
display = jetson.utils.glDisplay()
while display.IsOpen():
img, width, height = camera.CaptureRGBA()
detections = net.Detect(img, width, height)
display.RenderOnce(img, width, height)
display.SetTitle("Object Detection | Network {:.0f} FPS".format(net.GetNetworkFPS()))谢谢
发布于 2020-03-27 23:58:15
.pb文件是冻结的TensorFlow图形。所以你需要安装TF和它的依赖库。但是,您不能使用pip install或sudo apt install对包括TF在内的大多数库执行此操作,您需要从源代码或从它们的轮子.whl文件构建它们。
有关更详细的过程,请参考Maduinos在安装TensorFlow、Numpy、Scipy、Pandas、OpenCV等文件中的逐步tutorial。
https://stackoverflow.com/questions/60741190
复制相似问题