1

伙计们,我有一个问题。我可以在我的 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()))

谢谢

4

1 回答 1

0

.pb 文件是冻结的 TensorFlow 图。所以你需要安装 TF 及其依赖的库。但是,您不能使用pip installor对包括 TF 在内的大多数库执行此操作sudo apt install,您需要从源代码或从它们的 wheel .whl 文件构建它们。

有关更详细的过程,请按照 Maduinos 的分步教程安装 TensorFlow、Numpy、Scipy、Pandas、OpenCV 等...

于 2020-03-27T15:58:15.423 回答