第一次预测
在包含 examples/inference/ 的项目根目录操作。先完成环境安装和资源准备。
RGB 示例
编辑 examples/inference/predict_image.py 末尾的资源路径和物体编号,再执行:
python examples/inference/predict_image.py
结果保存于 outputs/rgb/,包含检测框和标准位姿可视化。也可在 Python 应用中调用:
from examples.inference.predict_image import main
# 路径指向自己准备的图像、内参及配套模型。
results = main("data/demo-bin-picking", "data/test_imgs_RGBD/000003_rgb.png",
"data/test_imgs_RGBD/000003_camera_matrix.json", [1], "outputs/rgb")
这一步需要匹配的权重与支持 CUDA 的 GPU 环境。
Your first prediction
Work from the project root, which contains examples/inference/. Complete installation and resource preparation first.
RGB example
Edit the resource paths and object IDs at the end of examples/inference/predict_image.py, then run:
python examples/inference/predict_image.py
Outputs go to outputs/rgb/, including detection and standard pose visualizations. Applications may also call:
from examples.inference.predict_image import main
# Use your own image, intrinsics and matching model resources.
results = main("data/demo-bin-picking", "data/test_imgs_RGBD/000003_rgb.png",
"data/test_imgs_RGBD/000003_camera_matrix.json", [1], "outputs/rgb")
This step requires matching weights and a CUDA-capable GPU environment.