mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-05 07:18:57 +08:00
Rename train_split_percentage with train_split_fraction (#1497)
rename train_split_percentage with train_split_fraction
This commit is contained in:
1 parent
1a2bbc5725
commit
e0ad53762e
4 files changed
+10
-10
No files matched your search
@@ -69,8 +69,8 @@ class NerfstudioDataParserConfig(DataParserConfig):
|
|||||||
"""How much to scale the region of interest by."""
|
"""How much to scale the region of interest by."""
|
||||||
orientation_method: Literal["pca", "up"] = "up"
|
orientation_method: Literal["pca", "up"] = "up"
|
||||||
"""The method to use for orientation."""
|
"""The method to use for orientation."""
|
||||||
train_split_percentage: float = 0.9
|
train_split_fraction: float = 0.9
|
||||||
"""The percent of images to use for training. The remaining images are for eval."""
|
"""The fraction of images to use for training. The remaining images are for eval."""
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class Nerfstudio(DataParser):
|
class Nerfstudio(DataParser):
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ class NerfstudioDataParserConfig(DataParserConfig):
|
|||||||
"""Whether to center the poses."""
|
"""Whether to center the poses."""
|
||||||
auto_scale_poses: bool = True
|
auto_scale_poses: bool = True
|
||||||
"""Whether to automatically scale the poses to fit in +/- 1 bounding box."""
|
"""Whether to automatically scale the poses to fit in +/- 1 bounding box."""
|
||||||
train_split_percentage: float = 0.9
|
train_split_fraction: float = 0.9
|
||||||
"""The percent of images to use for training. The remaining images are for eval."""
|
"""The fraction of images to use for training. The remaining images are for eval."""
|
||||||
depth_unit_scale_factor: float = 1e-3
|
depth_unit_scale_factor: float = 1e-3
|
||||||
"""Scales the depth values to meters. Default value is 0.001 for a millimeter to meter conversion."""
|
"""Scales the depth values to meters. Default value is 0.001 for a millimeter to meter conversion."""
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ class Nerfstudio(DataParser):
|
|||||||
|
|
||||||
# filter image_filenames and poses based on train/eval split percentage
|
# filter image_filenames and poses based on train/eval split percentage
|
||||||
num_images = len(image_filenames)
|
num_images = len(image_filenames)
|
||||||
num_train_images = math.ceil(num_images * self.config.train_split_percentage)
|
num_train_images = math.ceil(num_images * self.config.train_split_fraction)
|
||||||
num_eval_images = num_images - num_train_images
|
num_eval_images = num_images - num_train_images
|
||||||
i_all = np.arange(num_images)
|
i_all = np.arange(num_images)
|
||||||
i_train = np.linspace(
|
i_train = np.linspace(
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class NuScenesDataParserConfig(DataParserConfig):
|
|||||||
mask_dir: Optional[Path] = None
|
mask_dir: Optional[Path] = None
|
||||||
"""Path to masks of dynamic objects."""
|
"""Path to masks of dynamic objects."""
|
||||||
|
|
||||||
train_split_percentage: float = 0.9
|
train_split_fraction: float = 0.9
|
||||||
"""The percent of images to use for training. The remaining images are for eval."""
|
"""The percent of images to use for training. The remaining images are for eval."""
|
||||||
|
|
||||||
verbose: bool = False
|
verbose: bool = False
|
||||||
@@ -160,7 +160,7 @@ class NuScenes(DataParser):
|
|||||||
|
|
||||||
# filter image_filenames and poses based on train/eval split percentage
|
# filter image_filenames and poses based on train/eval split percentage
|
||||||
num_snapshots = len(samples)
|
num_snapshots = len(samples)
|
||||||
num_train_snapshots = math.ceil(num_snapshots * self.config.train_split_percentage)
|
num_train_snapshots = math.ceil(num_snapshots * self.config.train_split_fraction)
|
||||||
num_eval_snapshots = num_snapshots - num_train_snapshots
|
num_eval_snapshots = num_snapshots - num_train_snapshots
|
||||||
i_all = np.arange(num_snapshots)
|
i_all = np.arange(num_snapshots)
|
||||||
i_train = np.linspace(
|
i_train = np.linspace(
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ class PhototourismDataParserConfig(DataParserConfig):
|
|||||||
"""How much to scale the camera origins by."""
|
"""How much to scale the camera origins by."""
|
||||||
alpha_color: str = "white"
|
alpha_color: str = "white"
|
||||||
"""alpha color of background"""
|
"""alpha color of background"""
|
||||||
train_split_percentage: float = 0.9
|
train_split_fraction: float = 0.9
|
||||||
"""The percent of images to use for training. The remaining images are for eval."""
|
"""The fraction of images to use for training. The remaining images are for eval."""
|
||||||
scene_scale: float = 1.0
|
scene_scale: float = 1.0
|
||||||
"""How much to scale the region of interest by."""
|
"""How much to scale the region of interest by."""
|
||||||
orientation_method: Literal["pca", "up", "none"] = "up"
|
orientation_method: Literal["pca", "up", "none"] = "up"
|
||||||
@@ -119,7 +119,7 @@ class Phototourism(DataParser):
|
|||||||
|
|
||||||
# filter image_filenames and poses based on train/eval split percentage
|
# filter image_filenames and poses based on train/eval split percentage
|
||||||
num_images = len(image_filenames)
|
num_images = len(image_filenames)
|
||||||
num_train_images = math.ceil(num_images * self.config.train_split_percentage)
|
num_train_images = math.ceil(num_images * self.config.train_split_fraction)
|
||||||
num_eval_images = num_images - num_train_images
|
num_eval_images = num_images - num_train_images
|
||||||
i_all = np.arange(num_images)
|
i_all = np.arange(num_images)
|
||||||
i_train = np.linspace(
|
i_train = np.linspace(
|
||||||
|
|||||||
Reference in new issue
Block a user