Former-commit-id: 90db47806a53d9fc9830b48ca7ee3ce27545b418
pull/160/head
Kye 2 years ago
parent 501dad4943
commit a46a3e298a

@ -1046,11 +1046,11 @@ class Text2Box:
# load image
image_pil = Image.open(image_path).convert("RGB") # load image
transform = Compose(
transform = T.Compose(
[
RandomResize([512], max_size=1333),
ToTensor(),
Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]),
T.RandomResize([512], max_size=1333),
T.ToTensor(),
T.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]),
]
)
image, _ = transform(image_pil, None) # 3, h, w

Loading…
Cancel
Save