Read the BOP sample读取 BOP 示例数据
The small pack samples/bop/lmo/ has the eight LM-O[1] meshes and two frames of scene 2, under test/000002/. Image 1 is the frame examples/05_bop_6d_detection.py reads. It is not a row of test_targets_bop19.json. Image 307 is a BOP test target, and examples/04_6d_localization.py reads it with one known count for each of the eight categories. The source snippets below read the CADs and image 307 in example 04. The reader does not look for a .pt file. It lists every models/obj_######.ply and takes the number in the file name as obj_id. The English word is the LM-O name for that id. The ply does not store it. mesh is the geometry loaded from that file.
示例包 samples/bop/lmo/ 里是 LM-O[1] 的八个网格,以及场景 2 的两帧,在 test/000002/。第 1 帧是 examples/05_bop_6d_detection.py 读的那一帧,它不在 test_targets_bop19.json 里。第 307 帧是 BOP 测试目标,examples/04_6d_localization.py 读取的即是该帧,八个类别各有一个预先给定的数量。下方源码片段展示示例 04 中的 CAD 读取与第 307 帧加载。读取器不检索 .pt。它列出每一个 models/obj_######.ply,把文件名里的数字当成 obj_id。英文是 LM-O 给这个编号的名字,ply 里不存这个名字。mesh 是从该文件读入的网格。
In cells quote literal fragments from the examples' if __name__ == "__main__": blocks. Run the complete named script for its imports, recipe variables and stage order. Out text is a verbatim excerpt of saved stdout. Independent visualizations and benchmark records are presented separately.
In 单元摘录示例 if __name__ == "__main__": 块内的原文片段;导入、配置变量及完整阶段顺序见对应脚本。Out 文本为已保存标准输出的原样摘录;独立可视化与计时记录另行展示。
lmo/
models/obj_000001.ply
models/obj_000005.ply
models/obj_000006.ply
models/obj_000008.ply
models/obj_000009.ply
models/obj_000010.ply
models/obj_000011.ply
models/obj_000012.ply
models/models_info.json
test/000002/rgb/000001.png
test/000002/rgb/000307.png
test/000002/depth/000001.png
test/000002/depth/000307.png
test/000002/scene_camera.json
test/000002/scene_gt.json
cnos-fastsam_scene2_im307.json
mesh_only = {}
meshes = {}
for obj_id in obj_ids:
mesh, diameter_m = load_mesh_m(bop_path, dataset, obj_id)
mesh.metadata["name"] = str(object_names[obj_id])
mesh_only[obj_id] = mesh
meshes[obj_id] = (mesh, diameter_m)Source: examples/04_6d_localization.py, lines 80–86代码来源:examples/04_6d_localization.py,第 80–86 行
References and licenses参考文献与许可
- LM-O data — CC-BY-SA-4.0. Data and model excerpt, not the loader code.数据与模型摘录,不是读取代码。 · Original source原始来源 · GitHub: BOP toolkitGitHub:BOP 工具集
Model weights and dataset/task assets may have separate terms. WAPR's source license does not replace them.模型权重、数据集与任务资源可能有独立条款;WAPR 源码许可不替代这些许可。