You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
① If max(image.size) > max_len, max_len / aspect_ratio is always smaller than min_hw, so shortest_edge can be simplified to int(min(max_len / aspect_ratio, min_len)
② I'm also confused about min_len, in int(min(max_len / aspect_ratio, min_len), the constraint about max_len is larger than min_len(the shortest_edge can be smaller than min_len). The only thing min_len does is to resize image smaller when max_len / aspect_ratio > min_len
I think shortest_edge = int(max_len / aspect_ratio) is ok.
The text was updated successfully, but these errors were encountered:
Question
In llava/conversation.py, to limit image's size, shortest_edge is determined by
int(min(max_len / aspect_ratio, min_len, min_hw))
LLaVA/llava/conversation.py
Lines 133 to 143 in 4e2277a
① If
max(image.size) > max_len
,max_len / aspect_ratio
is always smaller than min_hw, so shortest_edge can be simplified toint(min(max_len / aspect_ratio, min_len)
② I'm also confused about min_len, in
int(min(max_len / aspect_ratio, min_len)
, the constraint about max_len is larger than min_len(the shortest_edge can be smaller than min_len). The only thing min_len does is to resize image smaller whenmax_len / aspect_ratio > min_len
I think
shortest_edge = int(max_len / aspect_ratio)
is ok.The text was updated successfully, but these errors were encountered: