WAPR, wide-angle pose refinement
WAPR

One category, one instance单类别、单实例

The default input samples/pose_lmo/mask.png is the BOP annotated visible mask of object 12, instance 7. The example estimates a pose from this supplied mask; it does not predict the mask or detect the object. No annotated 6D pose is supplied. For an automatic detector-to-pose workflow, continue to example 05.

默认输入 samples/pose_lmo/mask.png 是 BOP 中物体 12、第 7 个实例的标注可见掩码。本例在给定掩码的条件下估计位姿,不预测掩码或检测物体,也不输入标注的 6D 位姿。自动检测后估计位姿的流程见示例 05。

LM-O scene 2 image 1: the supplied visible mask of the holepuncher, highlighted in blue
Input: supplied visible mask. Blue highlights the annotated region of object 12, the holepuncher. RGB-D, camera intrinsics and its CAD model are also provided.输入:给定可见掩码。蓝色标出物体 12(打孔器)的标注区域,同时输入 RGB-D、相机内参和该物体的 CAD 模型。
Saved example 02 result: the predicted object-to-camera pose of the holepuncher, shown as a red 3D box
Output: predicted 6D pose. The saved example result projects a red 3D box using the estimated pose. Only the supplied instance is estimated; the other objects remain in the background.输出:预测的 6D 位姿。已保存的示例结果用估计位姿投影出红色三维框。这里只估计给定的单个实例,其余物体保留在背景中。

The example reads the observation and model, estimates one pose, then projects that pose onto the RGB image. The returned pose_4x4 transforms points from the CAD object frame to the camera frame; its translation is in meters. score_6d is the WBPS pose score, not an ADD error. The image above shows the predicted pose without a ground-truth pose overlay.

示例依次读取观测与模型、估计一条位姿,再将该位姿投影到 RGB 图像上。返回的 pose_4x4 将 CAD 物体系中的点变换到相机系,平移单位为米。score_6d 是 WBPS 位姿评分,不是 ADD 误差。上图展示预测位姿,没有叠加真值位姿。

examples/02_one_category_one_instance.py is one mesh, one mask, and one pose. It calls estimate_one_category_one_instance once. It does not search for other instances or categories, and it is not a complete BOP evaluation run. The BOP protocol also uses “6D localization” for the single-object, single-instance task defined in 2019; here the separate localization lesson follows the multi-object setting with supplied identities and counts. If the checkpoints or the LM-O[1] frame are not on disk yet, the example downloads the missing pack from SEU-WYL/WAPR, falling back to https://hf-mirror.com if needed. The frame, its source, and its license are in the LM-O section.

examples/02_one_category_one_instance.py 使用一个网格和一块掩码估计位姿;它只调用一次 estimate_one_category_one_instance,不搜索其他实例或类别,也不是一次完整的 BOP 评测。BOP 协议中2019 年的单物体单实例任务也称“6D 定位”;本教程单列的定位示例采用已提供物体类别及数量的多物体设定。若权重或 LM-O[1] 样例尚未位于磁盘,示例从 SEU-WYL/WAPR 下载缺失数据包,必要时改用 https://hf-mirror.com。该帧的来源及许可见 LM-O 一节。

python examples/02_one_category_one_instance.py

The default recipe uses mask.png with bbox_xywh = None. To supply a box instead, set bbox_xywh = [x, y, w, h] in pixels, with y pointing down; that path does not read the mask. WAPR 0.0.5 enables overlays by default and saves this example to outputs/vis/single_image.jpg. Use visualize in wapr/recipe.py to enable or disable them.

默认配置设置 bbox_xywh = None,使用 mask.png。改用包围盒时,设置像素坐标 bbox_xywh = [x, y, w, h],y 向下;这条路径不读取 mask。WAPR 0.0.5 默认开启叠图,本示例输出到 outputs/vis/single_image.jpg;可通过 wapr/recipe.py 中的 visualize 开关控制。

For the BOP task setting and the other LM-O input configurations, see BOP benchmark results[2].

BOP 任务设定与其他 LM-O 输入配置见BOP 基准结果[2]。

References and licenses参考文献与许可

  1. LM-O data — CC-BY-SA-4.0. Data and model excerpt, not the loader code.数据与模型摘录,不是读取代码。 · Original source原始来源 · GitHub: BOP toolkitGitHub:BOP 工具集
    Brachmann et al. Learning 6D Object Pose Estimation Using 3D Object Coordinates. ECCV 2014. · Paper论文 ↩ ↩
  2. BOP benchmark · GitHubGitHub
    Hodaň et al. BOP: Benchmark for 6D Object Pose Estimation. ECCV 2018. · Paper论文 ↩ ↩

Model weights and dataset/task assets may have separate terms. WAPR's source license does not replace them.模型权重、数据集与任务资源可能有独立条款;WAPR 源码许可不替代这些许可。