Stefan Wolf commited on
Commit
337cf38
1 Parent(s): 22da683

Fixed inference script.

Browse files
Files changed (2) hide show
  1. mmpretrain_custom/datasets/fungi.py +1 -1
  2. script.py +5 -5
mmpretrain_custom/datasets/fungi.py CHANGED
@@ -766,5 +766,5 @@ class FungiTest(Fungi):
766
  'observation_id': obs_id
767
  }
768
 
769
- data_list = [to_dict(img_path, obs_id) for img_path, obs_id in zip(table['image_path'], table['observationID'])]
770
  return data_list
 
766
  'observation_id': obs_id
767
  }
768
 
769
+ data_list = [to_dict(img_path, obs_id) for img_path, obs_id in zip(table['image_path'], table['observation_id'])]
770
  return data_list
script.py CHANGED
@@ -42,11 +42,11 @@ def run_inference(input_csv, output_csv, data_root_path):
42
 
43
  if __name__ == "__main__":
44
 
45
- # import zipfile
46
 
47
- # with zipfile.ZipFile("/tmp/data/private_testset.zip", 'r') as zip_ref:
48
- # zip_ref.extractall("/tmp/data")
49
 
50
- metadata_file_path = "./data/fungi2024/FungiCLEF2023_val_metadata_PRODUCTION.csv" #"./FungiCLEF2024_TestMetadata.csv"
51
 
52
- run_inference(metadata_file_path, "./submission.csv", "./data/fungi2024/DF21/")#"/tmp/data/private_testset")
 
42
 
43
  if __name__ == "__main__":
44
 
45
+ import zipfile
46
 
47
+ with zipfile.ZipFile("/tmp/data/private_testset.zip", 'r') as zip_ref:
48
+ zip_ref.extractall("/tmp/data")
49
 
50
+ metadata_file_path = "./FungiCLEF2024_TestMetadata.csv"
51
 
52
+ run_inference(metadata_file_path, "./submission.csv", "/tmp/data/private_testset")