zeleznyt commited on
Commit
8f97687
·
verified ·
1 Parent(s): 401f9a5

Update script.py

Browse files
Files changed (1) hide show
  1. script.py +4 -4
script.py CHANGED
@@ -67,13 +67,13 @@ def make_submission(test_metadata, model_paths, model_name, output_csv_path="./s
67
  image_path = os.path.join(images_root_path, row.filename)
68
 
69
  test_image = Image.open(image_path).convert("RGB")
70
- flipped_image = test_image.transpose(Image.FLIP_LEFT_RIGHT)
71
 
72
  result_logits = []
73
 
74
  for model in models:
75
  result_logits += model.predict_image(test_image)
76
- result_logits += model.predict_image(flipped_image)
77
 
78
  logits = np.average(np.array(result_logits), 0)
79
 
@@ -93,8 +93,8 @@ if __name__ == "__main__":
93
  zip_ref.extractall("/tmp/data")
94
 
95
  # MODEL_PATH = "pytorch_model.bin"
96
- MODEL_PATH = ["2405_PSCmetric_real3_best_accuracy.pth",
97
- "2405_cls_boost_best_accuracy.pth"
98
  ]
99
  # MODEL_NAME = "tf_efficientnet_b1.ap_in1k"
100
  MODEL_NAME = "swinv2_tiny_window16_256.ms_in1k"
 
67
  image_path = os.path.join(images_root_path, row.filename)
68
 
69
  test_image = Image.open(image_path).convert("RGB")
70
+ # flipped_image = test_image.transpose(Image.FLIP_LEFT_RIGHT)
71
 
72
  result_logits = []
73
 
74
  for model in models:
75
  result_logits += model.predict_image(test_image)
76
+ # result_logits += model.predict_image(flipped_image)
77
 
78
  logits = np.average(np.array(result_logits), 0)
79
 
 
93
  zip_ref.extractall("/tmp/data")
94
 
95
  # MODEL_PATH = "pytorch_model.bin"
96
+ MODEL_PATH = ["__best_accuracy.pth",
97
+ # "2405_cls_boost_best_accuracy.pth"
98
  ]
99
  # MODEL_NAME = "tf_efficientnet_b1.ap_in1k"
100
  MODEL_NAME = "swinv2_tiny_window16_256.ms_in1k"