Spaces:
Runtime error
Runtime error
ryanzhangfan
commited on
Commit
•
59624a6
1
Parent(s):
562648a
only resize large images
Browse files- demo/meta.py +4 -1
demo/meta.py
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
# Email : zhangfan@baai.ac.cn
|
9 |
# Institute : Beijing Academy of Artificial Intelligence (BAAI)
|
10 |
# Create On : 2023-12-12 02:54
|
11 |
-
# Last Modified : 2023-12-20 16:
|
12 |
# File Name : meta.py
|
13 |
# Description :
|
14 |
#
|
@@ -191,6 +191,9 @@ class DataMeta:
|
|
191 |
|
192 |
for idx, im in enumerate(image):
|
193 |
w, h = im.size
|
|
|
|
|
|
|
194 |
if w < h:
|
195 |
h = int(EVA_IMAGE_SIZE / w * h)
|
196 |
w = EVA_IMAGE_SIZE
|
|
|
8 |
# Email : zhangfan@baai.ac.cn
|
9 |
# Institute : Beijing Academy of Artificial Intelligence (BAAI)
|
10 |
# Create On : 2023-12-12 02:54
|
11 |
+
# Last Modified : 2023-12-20 16:41
|
12 |
# File Name : meta.py
|
13 |
# Description :
|
14 |
#
|
|
|
191 |
|
192 |
for idx, im in enumerate(image):
|
193 |
w, h = im.size
|
194 |
+
if w < EVA_IMAGE_SIZE or h < EVA_IMAGE_SIZE:
|
195 |
+
continue
|
196 |
+
|
197 |
if w < h:
|
198 |
h = int(EVA_IMAGE_SIZE / w * h)
|
199 |
w = EVA_IMAGE_SIZE
|