|
8 | 8 |
|
9 | 9 |
|
10 | 10 | def test_run_training(): |
11 | | - # export_path = test_root / 'consensus_benchmark' / 'consensus_test_data' |
12 | | - # if len(sa.search_projects(project_name)) != 0: |
13 | | - # sa.delete_project(project_name) |
14 | | - # time.sleep(2) |
15 | | - # |
16 | | - # sa.create_project(project_name, "test bench", "Vector") |
17 | | - # time.sleep(2) |
18 | | - # for i in range(1, 4): |
19 | | - # sa.create_folder(project_name, "consensus_" + str(i)) |
20 | | - # time.sleep(2) |
21 | | - # sa.create_annotation_classes_from_classes_json( |
22 | | - # project_name, export_path / 'classes' / 'classes.json' |
23 | | - # ) |
24 | | - # sa.upload_images_from_folder_to_project( |
25 | | - # project_name, export_path / "images", annotation_status="Completed" |
26 | | - # ) |
27 | | - # for i in range(1, 4): |
28 | | - # sa.upload_images_from_folder_to_project( |
29 | | - # project_name + '/consensus_' + str(i), |
30 | | - # export_path / "images", |
31 | | - # annotation_status="Completed" |
32 | | - # ) |
33 | | - # sa.upload_annotations_from_folder_to_project(project_name, export_path) |
34 | | - # for i in range(1, 4): |
35 | | - # sa.upload_annotations_from_folder_to_project( |
36 | | - # project_name + '/consensus_' + str(i), |
37 | | - # export_path / ('consensus_' + str(i)) |
38 | | - # ) |
39 | | - # time.sleep(2) |
| 11 | + export_path = test_root / 'consensus_benchmark' / 'consensus_test_data' |
| 12 | + if len(sa.search_projects(project_name)) != 0: |
| 13 | + sa.delete_project(project_name) |
| 14 | + time.sleep(2) |
| 15 | + |
| 16 | + sa.create_project(project_name, "test bench", "Vector") |
| 17 | + time.sleep(2) |
| 18 | + for i in range(1, 4): |
| 19 | + sa.create_folder(project_name, "consensus_" + str(i)) |
| 20 | + time.sleep(2) |
| 21 | + sa.create_annotation_classes_from_classes_json( |
| 22 | + project_name, export_path / 'classes' / 'classes.json' |
| 23 | + ) |
| 24 | + sa.upload_images_from_folder_to_project( |
| 25 | + project_name, export_path / "images", annotation_status="Completed" |
| 26 | + ) |
| 27 | + for i in range(1, 4): |
| 28 | + sa.upload_images_from_folder_to_project( |
| 29 | + project_name + '/consensus_' + str(i), |
| 30 | + export_path / "images", |
| 31 | + annotation_status="Completed" |
| 32 | + ) |
| 33 | + sa.upload_annotations_from_folder_to_project(project_name, export_path) |
| 34 | + for i in range(1, 4): |
| 35 | + sa.upload_annotations_from_folder_to_project( |
| 36 | + project_name + '/consensus_' + str(i), |
| 37 | + export_path / ('consensus_' + str(i)) |
| 38 | + ) |
| 39 | + time.sleep(2) |
40 | 40 | new_model = sa.run_training( |
41 | 41 | "some name", |
42 | 42 | "some desc", |
|
0 commit comments