Name: Manikandtan Chiral Kunjunni Kartha
Andrew ID: mchiralk
Late days used: 1
run command
python main.py --config-name=box
XY grid | Rays |
---|---|
python main.py --config-name=box
python main.py --config-name=box
Rendered cube | Depth Image |
---|---|
def get_random_pixels_from_image(n_pixels, image_size, camera):
xy_grid = get_pixels_from_image(image_size, camera)
# TODO (2.1): Random subsampling of pixel coordinates
indices = torch.randint(low=0, high=xy_grid.shape[0], size=(n_pixels, 1))
xy_grid_sub = xy_grid[indices].squeeze(1).to(camera.device)
# Return
return xy_grid_sub.reshape(-1, 2)[:n_pixels]
Replace the loss in train
# TODO (2.2): Calculate loss
loss = torch.nn.MSELoss(reduction='mean')(out['feature'], rgb_gt)
python main.py --config-name=train_box
Box center: (0.25023114681243896, 0.25058114528656006, -0.0004499410279095173)
Box side lengths: (2.0051236152648926, 1.5036123991012573, 1.5034124851226807)
python main.py --config-name=nerf_lego
# modify in config:
# implicit_function:
# enable_view_dependence: true
python main.py --config-name=nerf_lego
without view dependence | with view dependence |
---|---|
128 px, 128 pts per ray | 400px, 128 pts per ray |
---|---|
higher n_pts_per_ray helps in having higher resolution output render, but increases memory usage
32 pts per ray, 32768 chunk size | 128 pts per ray, 32768 chunk size | 256 pts per ray, 24576 chunk size |
---|---|---|