33import superannotate as sa
44
55test_root = Path ().resolve () / 'tests'
6- project_name = "consensus_enhanced "
6+ project_name = "benchmark_enhanced "
77
88
99def test_benchmark ():
@@ -15,13 +15,32 @@ def test_benchmark():
1515 'attributes' , 'folderName' , 'score'
1616 ]
1717 export_path = test_root / 'consensus_benchmark' / 'consensus_test_data'
18+ if len (sa .search_projects (project_name )) != 0 :
19+ sa .delete_project (project_name )
20+
21+ sa .create_project (project_name , "test bench" , "Vector" )
22+ for i in range (1 , 4 ):
23+ sa .create_folder (project_name , "consensus_" + str (i ))
24+ sa .create_annotation_classes_from_classes_json (
25+ project_name , export_path / 'classes' / 'classes.json'
26+ )
27+ sa .upload_images_from_folder_to_project (
28+ project_name , export_path / "images"
29+ )
30+ for i in range (1 , 4 ):
31+ sa .upload_images_from_folder_to_project (
32+ project_name + '/consensus_' + str (i ), export_path / "images"
33+ )
34+ sa .upload_annotations_from_folder_to_project (project_name , export_path )
35+ for i in range (1 , 4 ):
36+ sa .upload_annotations_from_folder_to_project (
37+ project_name + '/consensus_' + str (i ),
38+ export_path / ('consensus_' + str (i ))
39+ )
40+
1841 for annot_type in annot_types :
1942 res_df = sa .benchmark (
20- project_name ,
21- gt_folder_name ,
22- folder_names ,
23- export_root = export_path ,
24- annot_type = annot_type
43+ project_name , gt_folder_name , folder_names , annot_type = annot_type
2544 )
2645 #test content of projectName column
2746 assert sorted (res_df ['folderName' ].unique ()) == folder_names
0 commit comments