chychiu commited on
Commit
b18eb82
·
1 Parent(s): b791c77

fix script

Browse files
Files changed (1) hide show
  1. script.py +9 -20
script.py CHANGED
@@ -446,32 +446,21 @@ if __name__ == "__main__":
446
  MODEL_PATH = "metaformer-s-224.pth"
447
  MODEL_NAME = "timm/vit_base_patch14_reg4_dinov2.lvd142m"
448
 
449
- # Real submission
450
  # import zipfile
451
 
452
- with zipfile.ZipFile("/tmp/data/private_testset.zip", 'r') as zip_ref:
453
- zip_ref.extractall("/tmp/data")
454
 
455
- # metadata_file_path = "./test_preprocessed.csv"
456
- # test_metadata = pd.read_csv(metadata_file_path)
457
-
458
- # make_submission(
459
- # test_metadata=test_metadata,
460
- # model_path=MODEL_PATH,
461
- # model_name=MODEL_NAME
462
- # )
463
 
464
  # Test submission
465
-
466
  metadata_file_path = "../trial_submission.csv"
 
467
 
468
- test_metadata = pd.read_csv(metadata_file_path)
469
-
470
- make_submission(
471
- test_metadata=test_metadata,
472
- model_path=MODEL_PATH,
473
- model_name=MODEL_NAME,
474
- images_root_path="../data/DF_FULL"
475
- )
476
 
 
477
 
 
 
446
  MODEL_PATH = "metaformer-s-224.pth"
447
  MODEL_NAME = "timm/vit_base_patch14_reg4_dinov2.lvd142m"
448
 
449
+ # # Real submission
450
  # import zipfile
451
 
452
+ # with zipfile.ZipFile("/tmp/data/private_testset.zip", 'r') as zip_ref:
453
+ # zip_ref.extractall("/tmp/data")
454
 
455
+ # metadata_file_path = "./_test_preprocessed.csv"
456
+ # root_dir = "/tmp/data"
 
 
 
 
 
 
457
 
458
  # Test submission
 
459
  metadata_file_path = "../trial_submission.csv"
460
+ root_dir = "../data/DF_FULL"
461
 
462
+ ##############
 
 
 
 
 
 
 
463
 
464
+ metadata_df = generate_embeddings(metadata_file_path, root_dir)
465
 
466
+ make_submission(metadata_df)