You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# if -1, the worker gets all available indices in its partition
555
556
image_indices=worker_indices
@@ -562,10 +563,12 @@ def __iter__(self):
562
563
"""
563
564
Here, the variable 'batch' refers to the output of our pixel sampler.
564
565
- batch is a dict_keys(['image', 'indices'])
565
-
- batch['image'] returns a pytorch tensor with shape `torch.Size([4096, 3])` , where 4096 = num_rays_per_batch. Note: each row in this tensor represents the RGB values as floats in [0, 1] of the pixel the ray goes through. The info of what specific image index that pixel belongs to is stored within batch[’indices’]
566
-
- batch['indices'] returns a pytorch tensor `torch.Size([4096, 3])` tensor where each row represents (image_index=camera_index, pixelRow, pixelCol)
567
-
What the pixel_sampler does (for variable_res_collate) is that it loops though each image, samples pixel within the mask,
568
-
and returns them as the variable `indices` which has shape torch.Size([4096, 3]), where each row represents a pixel (image_idx, pixelRow, pixelCol)
566
+
- batch['image'] returns a pytorch tensor with shape `torch.Size([4096, 3])` , where 4096 = num_rays_per_batch.
567
+
- Note: each row in this tensor represents the RGB values as floats in [0, 1] of the pixel the ray goes through.
568
+
- The info of what specific image index that pixel belongs to is stored within batch[’indices’]
569
+
- batch['indices'] returns a pytorch tensor `torch.Size([4096, 3])` tensor where each row represents (image_idx, pixelRow, pixelCol)
570
+
pixel_sampler (for variable_res_collate) will loop though each image, samples pixel within the mask, and returns
571
+
them as the variable `indices` which has shape torch.Size([4096, 3]), where each row represents a pixel (image_idx, pixelRow, pixelCol)
0 commit comments