MarkusDressel commited on
Commit
55128e0
1 Parent(s): 58e0310

Upload cord.py

Browse files
Files changed (1) hide show
  1. cord.py +0 -2
cord.py CHANGED
@@ -26,7 +26,6 @@ _URL = "https://drive.google.com/uc?id=1MqhTbcj-AHXOqYoeoh12aRUwIprzTJYI"
26
 
27
  def load_image(image_path):
28
  image = Image.open(image_path)
29
- image = image.resize((224, 224), resample=Image.BILINEAR)
30
  image = image.convert("RGB")
31
  w, h = image.size
32
  return image, (w, h)
@@ -166,7 +165,6 @@ class Cord(datasets.GeneratorBasedBuilder):
166
 
167
  image, size = load_image(image_path)
168
  image = np.array(image)
169
- assert(image.shape ==(224,224,3))
170
 
171
  for item in data["valid_line"]:
172
  for word in item['words']:
 
26
 
27
  def load_image(image_path):
28
  image = Image.open(image_path)
 
29
  image = image.convert("RGB")
30
  w, h = image.size
31
  return image, (w, h)
 
165
 
166
  image, size = load_image(image_path)
167
  image = np.array(image)
 
168
 
169
  for item in data["valid_line"]:
170
  for word in item['words']: