xcssgzs commited on
Commit
cd69b81
·
verified ·
1 Parent(s): 9f424d7

Update script.py

Browse files
Files changed (1) hide show
  1. script.py +1 -1
script.py CHANGED
@@ -26,7 +26,7 @@ def predict(test_metadata, root_path='/tmp/data/private_testset', output_csv_pat
26
  for img_name in img_name_list:
27
  img_path = os.path.join(root_path, img_name)
28
  assert os.path.exists(img_path), "file: '{}' dose not exist.".format(img_path)
29
- img = Image.open(img_path)
30
  img = data_transform(img)
31
  img_list.append(img)
32
 
 
26
  for img_name in img_name_list:
27
  img_path = os.path.join(root_path, img_name)
28
  assert os.path.exists(img_path), "file: '{}' dose not exist.".format(img_path)
29
+ img = Image.open(img_path).convert('RGB')
30
  img = data_transform(img)
31
  img_list.append(img)
32