-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Seems to only be working with single images, works great with video if you add batch detection in def process_image
def process_image(self, input_image):
# Check if we've received a batch of images
batch_mode = False
batch_size = 1
if isinstance(input_image, torch.Tensor) and input_image.dim() == 4:
batch_size = input_image.shape[0]
batch_mode = batch_size > 1
# For single image case, keep the original logic
if not batch_mode:
if isinstance(input_image, torch.Tensor):
if input_image.dim() == 4:
input_image = input_image[0]
if input_image.dim() == 3:
input_image = input_image.permute(2, 0, 1)
input_image = self.to_pil(input_image)
I used claude, so can't guarantee the quality of this solution but it does seem to work
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels