Encodes intersection ids to offsets. Args: isect_ids: Intersection ids. [n_isects] n_cameras: Number of cameras. tile_width: Tile width. tile_height: Tile height. Returns: Offsets. [C, tile_height, tile_width]
(
isect_ids: Tensor, n_cameras: int, tile_width: int, tile_height: int
)
| 415 | |
| 416 | @torch.no_grad() |
| 417 | def isect_offset_encode( |
| 418 | isect_ids: Tensor, n_cameras: int, tile_width: int, tile_height: int |
| 419 | ) -> Tensor: |
| 420 | """Encodes intersection ids to offsets. |
| 421 | |
| 422 | Args: |
| 423 | isect_ids: Intersection ids. [n_isects] |
| 424 | n_cameras: Number of cameras. |
| 425 | tile_width: Tile width. |
| 426 | tile_height: Tile height. |
| 427 | |
| 428 | Returns: |
| 429 | Offsets. [C, tile_height, tile_width] |
| 430 | """ |
| 431 | return _make_lazy_cuda_func("isect_offset_encode")( |
| 432 | isect_ids.contiguous(), n_cameras, tile_width, tile_height |
| 433 | ) |
| 434 | |
| 435 | |
| 436 | def rasterize_to_pixels( |