25 lines
457 B
Python
25 lines
457 B
Python
"""
|
|
Image utility functions
|
|
"""
|
|
|
|
import torch
|
|
|
|
|
|
def create_empty_mask(
|
|
batch_size: int,
|
|
height: int,
|
|
width: int
|
|
) -> torch.Tensor:
|
|
"""
|
|
Create an empty mask tensor.
|
|
|
|
Args:
|
|
batch_size: Number of images in batch
|
|
height: Mask height
|
|
width: Mask width
|
|
|
|
Returns:
|
|
Zero-filled mask tensor as RGB (B, H, W, 3)
|
|
"""
|
|
return torch.zeros((batch_size, height, width, 3), dtype=torch.float32)
|