Commit 74507ce8 authored by Geewook Kim's avatar Geewook Kim
Browse files

fix: ensure RGB

parent 0e9a705a
......@@ -108,6 +108,7 @@ class SwinEncoder(nn.Module):
- rotate (if align_long_axis is True and image is not aligned longer axis with canvas)
- pad
"""
img = img.convert("RGB")
if self.align_long_axis and (
(self.input_size[0] > self.input_size[1] and img.width > img.height)
or (self.input_size[0] < self.input_size[1] and img.width < img.height)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment