Skip to content

Instantly share code, notes, and snippets.

@Mason-McGough
Created June 25, 2021 17:36
Show Gist options
  • Save Mason-McGough/29868a50fdf9957f767408c586f556f8 to your computer and use it in GitHub Desktop.
Save Mason-McGough/29868a50fdf9957f767408c586f556f8 to your computer and use it in GitHub Desktop.
GIRAFFE feature and sigma fields
# adapted from https://github.com/autonomousvision/giraffe (MIT License)
n_iter = n_boxes if not_render_background else n_boxes + 1
# ...
for i in range(n_iter):
if i < n_boxes: # Object
p_i, r_i = self.get_evaluation_points(pixels_world,
camera_world, di, transformations, i)
z_shape_i, z_app_i = z_shape_obj[:, i], z_app_obj[:, i]
feat_i, sigma_i = self.decoder(p_i, r_i, z_shape_i, z_app_i)
# ...
else: # Background
p_bg, r_bg = self.get_evaluation_points_bg(pixels_world,
camera_world, di, bg_rotation)
feat_i, sigma_i = self.background_generator(
p_bg, r_bg, z_shape_bg, z_app_bg)
# ...
feat.append(feat_i)
sigma.append(sigma_i)
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment