Skip to content

Commit

Permalink
fix: different image sizes for owlv2 postprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
sokovninn committed Oct 25, 2024
1 parent cd819c4 commit 5e45347
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datadreamer/dataset_annotation/owlv2_annotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def _generate_annotations(
"""
n = len(images)
batched_prompts = [prompts] * n
target_sizes = torch.Tensor(images[0].size[::-1]).repeat((n, 1)).to(self.device)
target_sizes = torch.Tensor([img.size[::-1] for img in images]).to(self.device)

# resize the images to the model's input size
img_size = (1008, 1008) if self.size == "large" else (960, 960)
Expand Down

0 comments on commit 5e45347

Please sign in to comment.