mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-10 18:17:31 +08:00
Fix "mutable default" error in render.py (#2825)
This fixes ``` ValueError: mutable default <class 'nerfstudio.data.scene_box.OrientedBox'> for field obb is not allowed: use default_factory ```
This commit is contained in:
parent
f2f4bf55b2
commit
67b1005784
@ -364,7 +364,7 @@ class CropData:
|
||||
|
||||
background_color: Float[Tensor, "3"] = torch.Tensor([0.0, 0.0, 0.0])
|
||||
"""background color"""
|
||||
obb: OrientedBox = OrientedBox(R=torch.eye(3), T=torch.zeros(3), S=torch.ones(3) * 2)
|
||||
obb: OrientedBox = field(default_factory=lambda: OrientedBox(R=torch.eye(3), T=torch.zeros(3), S=torch.ones(3) * 2))
|
||||
"""Oriented box representing the crop region"""
|
||||
|
||||
# properties for backwards-compatibility interface
|
||||
|
||||
Loading…
Reference in New Issue
Block a user