Stefan Wolf
commited on
Commit
•
337cf38
1
Parent(s):
22da683
Fixed inference script.
Browse files- mmpretrain_custom/datasets/fungi.py +1 -1
- 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['
|
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 |
-
|
46 |
|
47 |
-
|
48 |
-
|
49 |
|
50 |
-
metadata_file_path = "./
|
51 |
|
52 |
-
run_inference(metadata_file_path, "./submission.csv", "
|
|
|
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")
|