- Updated the naming convention for upscaled images to include underscores and file extensions. - Renamed properties related to cutout pixel size to point spacing for clarity. - Adjusted alpha region calculations to use a half-alpha threshold for better accuracy. - Enhanced the handling of foreground mesh masks to consider half-alpha values. - Introduced new functions for unbounded selections and cutout images, ensuring proper handling of source and selection images. - Improved test coverage for cutout functionalities, including bounds mapping and alpha preservation. - Updated tests to reflect changes in naming conventions and functionality adjustments.
4.2 KiB
输出格式
本页记录 Job 产物的稳定用途与主要字段。日常使用只需了解 Job 文件夹。
文件概览
| Job | 主要文件 | 内容 |
|---|---|---|
generate-depth |
results.npz、深度与颜色序列 |
Depth Plane 所需深度、相机和贴图 |
generate-surface |
mesh.npz、normal.png、颜色层 |
Surface 网格、相机与材质输入 |
remove-background |
image.0001.png 起 |
带 Alpha 的图片层 |
upscale-image |
upscale.0001.png 起 |
所选高清模型在输出上限内生成的 4× 高清层,并保留源图 Alpha |
refine-image-mask |
selection-input.png、image.png、bounds.json |
BEN2 细化后的局部内容 mask 与原图坐标 bounds |
generate-mesh |
image.0001.png、selection.png、bounds.json,按形状输出 normal.png、depth.npz 或 field.npz |
当前图片所选区域的矩形 Color、几何 mask、原图坐标 bounds,以及同尺寸的局部深度或法线结果 |
analyze-balloon |
lasso-input.png,按选项输出 foreground.png、contour.json、depth.npz、normal.png |
套索约束输入、BEN2 轮廓与 MoGe-2 深度、法线 |
debug-da3 |
prediction.npz |
DA3 API 返回 |
debug-moge2 |
prediction*.npz |
MoGe-2 API 返回 |
debug-ben2 |
foreground*.png |
BEN2 API 返回 |
debug-upscale |
prediction*.png |
请求模型的 4× RGB API 返回 |
NPZ 字段
DA3 Depth 结果包含 depth、conf、extrinsics 与 intrinsics。MoGe-2 Depth 结果包含 depth、normal、mask 与 intrinsics。
Balloon Depth 的 depth.npz 包含相对 depth_signal、归一化拟合平面 baseline_vector、valid、reference_depth、取样原点与输入尺寸。Cutout Job 先按套索或 Refine 最终 Alpha 紧裁出局部矩形:image.0001.png 保留当前图片在矩形内的原始 RGB 与原有 Alpha,不乘选择 mask;selection.png 保存几何 Alpha;供 MoGe 使用的内部分析图仅在选区内保留像素,范围外 RGBA 为零。深度、normal 与 Color 使用相同的非正方形局部尺寸,Blender 根据 bounds.json 恢复位置和 UV。若输入是 Upscale 图片,推理直接使用高清图的所选区域。几何与 Surface 前景均以 Alpha 0.5 为边界,小于 0.5 的顶点或区域会被剔除。Blender 创建并评估成品网格后,再用其 UV、平滑角法线与切线基底烘成实际使用的 tangent-space Image。
Surface 的 mesh.npz 包含 vertices、faces、uv、intrinsics、image_size 与 reference_depth,以及 Geometry Nodes 使用的网格属性。
Debug 文件保持模型 API 的数据形态,用于比较推理结果;正式 Job 则提供 Blender 导入所需的派生数据。三档高清模型的浮点 RGB 返回只做 [0, 1] 限制和 8-bit PNG 序列化,不做色调保护或额外画质处理;三个模型都使用 256×256、16 像素上下文的重叠分块,外边界以镜像像素提供模型上下文。输入含 Alpha 时,Alpha 不进入 RGB 模型,而是在相同输入限制后独立进行 4× 高质量插值并合并回 RGBA 结果。正式 upscale-image 还会在推理前应用输出长边与总像素上限,再把结果命名为 upscale.0001.png 起的序列并交给 Blender 写回 Image Empty;结果 Image 数据块始终基于原图名称使用 _upscale.png 后缀,重复执行时替换当前高清版本。
图片序列
正式图片层使用 image.0001.* 起始的文件名,Upscale 层单独使用 upscale.0001.png。导入 Blender 后,颜色、深度与法线 Image datablock 分别使用 _color.png、_depth.exr 与 _normal.png 后缀;重名时由 Blender 自动添加 .001。深度动画使用 EXR 序列以保存浮点值。源 Empty 为 Movie 或 Sequence 时,Blender 按序列载入这些文件,即使任务只输出一帧。
MoGe-2 Surface 的原生相机法线单独保存为 normal.png,Blender 以 object-space 解码。Depth Surface 同样直接保留该像素编码。Cutout、Balloon 与 Depth Balloon 不会把同一张图直接当作 tangent-space 解码,而是在 Blender 端依据各自最终评估网格的 TBN 重新生成 tangent-space 像素;材质的空间选择只负责匹配已经生成好的贴图。