Windows supports examples 01–10. Examples 11–17 and the supplied SAM3D, robot and RoMa setups require Linux. Default Windows preparation skips RoMa; explicit requests report the platform restriction. GroundingDINO source preparation requires Git on PATH: install Git, reopen the terminal and verify git --version.
Windows 支持示例 01–10。示例 11–17 及当前 SAM3D、机器人、RoMa 安装方案需要 Linux。Windows 默认准备跳过 RoMa;显式请求时提示平台限制。准备 GroundingDINO 源码需要 PATH 中可用的 Git:请安装 Git,重开终端并用 git --version 确认。
Installation guide安装引导
Install WAPR安装 WAPR
Reuse a compatible Linux or Windows NVIDIA GPU environment with CUDA-enabled PyTorch. The wheel does not bundle PyTorch, model weights or datasets. OGL requires a compatible CUDA toolkit, C++ compiler and CMake. Linux also needs OpenGL/EGL development libraries; Windows needs MSVC C++ build tools.
复用兼容的 Linux 或 Windows NVIDIA GPU 环境及支持 CUDA 的 PyTorch。wheel 不打包 PyTorch、模型权重或数据集。OGL 需要兼容的 CUDA toolkit、C++ 编译器和 CMake;Linux 还需 OpenGL/EGL 开发库,Windows 需要 MSVC C++ 构建工具。
python -m pip install -U wapr
python -m wapr.bootstrap --feature core dinov2 det2d sam2
python -c "from wapr.bootstrap import export_examples; export_examples('wapr_examples')"
python wapr_examples/02_one_category_one_instance.py
WAPR requires Python ≥3.10. This is a package requirement, not a guarantee that every optional dependency supports every Python, CUDA or operating-system version. Default preparation installs TensorRT 10 on supported systems; select the PyTorch backend explicitly when needed. The supplied SAM3D and robot planning setups require Linux. macOS pose inference is not supported.
WAPR 要求 Python ≥3.10;这不表示所有可选依赖支持每种 Python、CUDA 或操作系统版本。默认准备在支持的平台安装 TensorRT 10;需要时可显式选择 PyTorch 后端。随包 SAM3D 与机器人规划方案需要 Linux。不支持 macOS 位姿推理。
Preparation reuses the existing PyTorch environment and asks before replacing installed dependencies. Default setup prepares common features; individual entry functions also check missing dependencies on first use. Importing an example alone does not install optional features; Ultralytics is not a core dependency. For manual preparation, follow optional feature setup. The first example obtains its required resources and may take longer on its first run.
准备流程复用已有 PyTorch 环境,更换已有依赖前需确认。默认准备涵盖常用功能,各功能入口也会在首次使用时检查缺失依赖;仅导入示例不会安装可选功能,Ultralytics 不属于基础依赖。手动准备方式见扩展环境。首个示例会获取所需资源,首次运行可能耗时较长。
First preparation downloads model files and may compile native components. The Qwen snapshot is about 7.5 GB; TensorRT and an independent environment can require several more GB. Choose a resource volume with enough space. Later runs reuse verified downloads and builds. Some robot tracking recipes prepare the optional CUDA rasterizer on first use; default setup excludes it.
首次准备会下载模型文件,并可能编译原生组件。Qwen 快照约 7.5 GB;TensorRT 与独立环境可能另外需要数 GB。请选择空间充足的资源盘,后续运行复用已校验下载与编译结果。部分机器人跟踪示例首次使用时准备可选 CUDA 光栅器;默认准备不包含它。
Source usage源码使用
Clone the source to edit examples and use a compatible existing environment. Source and wheel share resource caches and bootstrap preparation; Conda is not required.
需要修改示例时可克隆源码,使用兼容的已有环境。源码与 wheel 共用资源缓存和 bootstrap 准备流程,不要求使用 Conda。
git clone https://github.com/WangYuLin-SEU/WAPR.git
Environment and resource preparation环境与资源准备
pip install wapr installs the package. python -m wapr.bootstrap --feature core dinov2 det2d sam2 prepares TensorRT, 2D detection, SAM2, DINOv2 and shared demo resources. Reconstruction and robotics are optional extensions. --feature core selects pose-only setup. Existing PyTorch is retained; replacing installed dependencies requires confirmation.
pip install wapr 安装项目包;python -m wapr.bootstrap --feature core dinov2 det2d sam2 在兼容环境准备 TensorRT、2D 检测、SAM2、DINOv2 和共用小样。重建与机器人扩展按需准备。--feature core 只准备位姿推理;保留现有 PyTorch,更换已安装依赖需确认。
Source and wheel share cache/weights/, cache/environments/ and dataset-specific cache/samples/ under the WAPR_CACHE_DIR resource root. Outputs are separate: outputs/<number_task>/. SAM2.1 uses the installed Ultralytics package. DINOv2 uses official Torch Hub and its existing cache. OpenGL is the default renderer; nvdiffrast is optional.
源码与 wheel 在 WAPR_CACHE_DIR 资源根下共用 cache/weights/、cache/environments/ 与按数据集组织的 cache/samples/。输出独立存于 outputs/<编号_任务>/。SAM2.1 通过已安装的 Ultralytics 调用;DINOv2 通过官方 Torch Hub 复用现有缓存。默认使用 OpenGL 渲染,nvdiffrast 为可选后端。
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 工具集Brachmann et al. Learning 6D Object Pose Estimation Using 3D Object Coordinates. ECCV 2014. · Paper论文
Model weights and dataset/task assets may have separate terms. WAPR's source license does not replace them.模型权重、数据集与任务资源可能有独立条款;WAPR 源码许可不替代这些许可。