Skip to content

Commit

Permalink
clean up for review
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNeRF committed Sep 27, 2024
1 parent 9fafbb3 commit 139b521
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
5 changes: 2 additions & 3 deletions examples/benchmarks/scaffold.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
SCENE_DIR="data/360_v2"
RESULT_DIR="results/benchmark"
#SCENE_LIST="garden bicycle stump bonsai counter kitchen room" # treehill flowers
SCENE_LIST="counter" # treehill flowers
SCENE_LIST="garden bicycle stump bonsai counter kitchen room" # treehill flowers
RENDER_TRAJ_PATH="ellipse"

for SCENE in $SCENE_LIST;
Expand Down Expand Up @@ -51,4 +50,4 @@ do
cat $STATS;
echo
done
done
done
20 changes: 1 addition & 19 deletions examples/simple_trainer_scaffold.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,13 @@ class Config:
disable_viewer: bool = False
# Path to the .pt files. If provide, it will skip training and run evaluation only.
ckpt: Optional[List[str]] = None
# ckpt: Optional[List[str]] = field(
# default_factory=lambda: [
# "/home/paja/projects/gsplat_fork/results/ckpts/ckpt_1999_rank0.pt"
# ]
# )
# Render trajectory path
render_traj_path: str = "ellipse"

# Path to the Mip-NeRF 360 dataset
data_dir: str = "examples/data/360_v2/room"
# data_dir: str = "/home/paja/.cache/nerfbaselines/datasets/tanksandtemples/truck/"
# data_dir: str = "/home/paja/data/bike_aliked"
# Downsample factor for the dataset
data_factor: int = 4
data_factor: int = 2
# Directory to save results
result_dir: str = "results"
# Every N images there is a test image
Expand Down Expand Up @@ -766,17 +759,6 @@ def train(self):
loss += ssimloss * cfg.ssim_lambda
loss += info["scales"].prod(dim=1).mean() * cfg.scale_reg

# Apply sigmoid to normalize values to [0, 1]
# sigmoid_opacities = torch.sigmoid(info["opacities"])
#
# # Custom loss to penalize values not close to 0 or 1
# def binarization_loss(x):
# return (x * (1 - x)).mean()
#
# # Calculate the binarization loss
# opa_loss = binarization_loss(sigmoid_opacities)
# loss += 0.01 * opa_loss

if cfg.depth_loss:
# query depths from depth map
points = torch.stack(
Expand Down

0 comments on commit 139b521

Please sign in to comment.