nielsr HF staff commited on
Commit
0a85396
1 Parent(s): f6424f0
Files changed (1) hide show
  1. FUNSD_layoutlmv2.py +1 -1
FUNSD_layoutlmv2.py CHANGED
@@ -30,7 +30,7 @@ def load_image(image_path):
30
  image = Image.open(image_path).convert("RGB")
31
  w, h = image.size
32
  # resize image to 224x224
33
- image = image.resize((224, 224)
34
  image = np.asarray(image)
35
  image = image[:, :, ::-1] # flip color channels from RGB to BGR
36
  image = image.transpose(2, 0, 1) # move channels to first dimension
30
  image = Image.open(image_path).convert("RGB")
31
  w, h = image.size
32
  # resize image to 224x224
33
+ image = image.resize((224, 224))
34
  image = np.asarray(image)
35
  image = image[:, :, ::-1] # flip color channels from RGB to BGR
36
  image = image.transpose(2, 0, 1) # move channels to first dimension