2.9 KiB
2.9 KiB
1. Shared reference depth
- 1.1 Add
reference_depth(image, mask=None)tosrc/anyimage/common/depth.py: take the 95th percentile of camera Z over pixels whose Depth texture Alpha is greater than0.95and whose depth is finite and positive, and return model units. - 1.2 Drop
reference_depthfromload_depth_metadata()and changedepth_uniform_scale()to take the computed reference depth instead of reading it from metadata. - 1.3 Move the base-shape direction fit into
common/depth.pyasfit_symmetry_depth_direction()besidefit_depth_direction(), then deletesrc/anyimage/operators/cutout_tool/depth_calibration.py. - 1.4 Delete
selection_calibration()fromsrc/anyimage/operators/cutout_tool/geometry.pyand remove its test. - 1.5 Drop reference samples farther than
REFERENCE_DEPTH_RANGE_FACTORtimes the median before the percentile, and returnREFERENCE_DEPTH_BASELINEwhen there is no valid pixel at all. - 1.6 Return the flat canonical direction from
fit_depth_direction()when no sample is usable, and delete the caller-sidetry/exceptin plane conversion.
2. Server artifacts
- 2.1 Remove the
reference_validargument and thereference_depthfield fromwrite_depth_metadata()insrc/anyimage/server/geometry/depth_texture.py. - 2.2 Drop
alpha_thresholdfromgenerate_moge_artifacts()and the cutout job parameters insrc/anyimage/server/jobs/cutout.py. - 2.3 Update the server metadata and artifact tests to expect a
depth.jsonwith onlyimage_sizeandintrinsics.
3. Depth shape initialization
- 3.1 Compute the reference depth in
create_depth_plane_object()andcreate_shape_object(); pass the cutout selection as the reference mask and use the whole depth image for plane conversion. - 3.2 Delete the transparency gate,
DEFAULT_DEPTH_BASELINE,DEFAULT_DEPTH_DIRECTIONfallback usage, and the adaptive calibration branch from the Cutout object creation path. - 3.3 Update the operator and shared support fixtures so depth metadata no longer carries a reference depth and Cutout depth shapes build from the shared reference.
- 3.4 Add regression coverage that a skewed depth field returns the 95th percentile and that a selection mask narrows the reference domain.
4. Relief base plane
- 4.1 Change the
Depth Offsetdefault to0intools/nodes/groups/image_relief_plane.py. - 4.2 Run
uv run node-group buildto rebuild and validatesrc/anyimage/assets/O_AnyImage.blend. - 4.3 Update the Relief Plane node tests and interface inventory for the new default and the reference-depth-driven base plane.
5. Verification
- 5.1 Run the affected
pytestmodules forcommon.depth, server artifacts, plane conversion, and cutout operators. - 5.2 Search for stale
reference_depthmetadata reads,depth_calibrationimports, and fixed-baseline references, then review the final diff.