Skip to content

Commit

Permalink
Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
bouchardi committed Apr 12, 2024
1 parent b48029b commit 3ae97ce
Show file tree
Hide file tree
Showing 11 changed files with 398 additions and 466 deletions.
168 changes: 0 additions & 168 deletions gaussian_splatting/colmap_free/local_initialization_trainer.py

This file was deleted.

94 changes: 0 additions & 94 deletions gaussian_splatting/colmap_free/local_transformation_trainer.py

This file was deleted.

6 changes: 4 additions & 2 deletions gaussian_splatting/dataset/image_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@


class ImageDataset:
def __init__(self, images_path: Path):
self._images_paths = [f for f in images_path.iterdir()]
def __init__(self, images_path: Path, step_size: int = 1):
self._images_paths = [
f for i, f in enumerate(images_path.iterdir()) if i % step_size == 0
]
self._images_paths.sort(key=lambda f: int(f.stem))

def get_frame(self, i: int):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class GlobalTrainer(Trainer):
def __init__(self, gaussian_model, output_path = None):
def __init__(self, gaussian_model, output_path=None):
self._model_path = self._prepare_model_path(output_path)

self.gaussian_model = gaussian_model
Expand Down Expand Up @@ -81,5 +81,4 @@ def run(self, iterations: int = 1000):
viewspace_point_tensor, visibility_filter, radii
)
self._densify_and_prune(True)
#self._reset_opacity()

# self._reset_opacity()
Loading

0 comments on commit 3ae97ce

Please sign in to comment.