jacklangerman
commited on
Commit
·
f73f74e
1
Parent(s):
fab49d6
return key with empty solution
Browse files- handcrafted_solution.py +2 -2
- script.py +2 -0
handcrafted_solution.py
CHANGED
@@ -235,9 +235,9 @@ def predict(entry, visualize=False) -> Tuple[np.ndarray, List[int]]:
|
|
235 |
all_3d_vertices_clean, connections_3d_clean = prune_not_connected(all_3d_vertices, connections_3d)
|
236 |
if (len(all_3d_vertices_clean) < 2) or len(connections_3d_clean) < 1:
|
237 |
print (f'Not enough vertices or connections in the 3D vertices')
|
238 |
-
return empty_solution()
|
239 |
if visualize:
|
240 |
-
from viz3d import plot_estimate_and_gt
|
241 |
plot_estimate_and_gt(all_3d_vertices_clean, connections_3d_clean, good_entry['wf_vertices'],
|
242 |
good_entry['wf_edges'])
|
243 |
return good_entry['__key__'], all_3d_vertices_clean, connections_3d_clean, [0 for i in range(len(connections_3d_clean))]
|
|
|
235 |
all_3d_vertices_clean, connections_3d_clean = prune_not_connected(all_3d_vertices, connections_3d)
|
236 |
if (len(all_3d_vertices_clean) < 2) or len(connections_3d_clean) < 1:
|
237 |
print (f'Not enough vertices or connections in the 3D vertices')
|
238 |
+
return (good_entry['__key__'], *empty_solution())
|
239 |
if visualize:
|
240 |
+
from hoho.viz3d import plot_estimate_and_gt
|
241 |
plot_estimate_and_gt(all_3d_vertices_clean, connections_3d_clean, good_entry['wf_vertices'],
|
242 |
good_entry['wf_edges'])
|
243 |
return good_entry['__key__'], all_3d_vertices_clean, connections_3d_clean, [0 for i in range(len(connections_3d_clean))]
|
script.py
CHANGED
@@ -102,6 +102,7 @@ def convert_entry_to_human_readable(entry):
|
|
102 |
|
103 |
### The part below is used to define and test your solution.
|
104 |
|
|
|
105 |
def save_submission(submission, path):
|
106 |
"""
|
107 |
Saves the submission to a specified path.
|
@@ -119,6 +120,7 @@ if __name__ == "__main__":
|
|
119 |
print ("------------ Loading dataset------------ ")
|
120 |
params = hoho.get_params()
|
121 |
dataset = hoho.get_dataset(decode=None, split='all', dataset_type='webdataset')
|
|
|
122 |
print('------------ Now you can do your solution ---------------')
|
123 |
solution = []
|
124 |
from concurrent.futures import ProcessPoolExecutor
|
|
|
102 |
|
103 |
### The part below is used to define and test your solution.
|
104 |
|
105 |
+
from pathlib import Path
|
106 |
def save_submission(submission, path):
|
107 |
"""
|
108 |
Saves the submission to a specified path.
|
|
|
120 |
print ("------------ Loading dataset------------ ")
|
121 |
params = hoho.get_params()
|
122 |
dataset = hoho.get_dataset(decode=None, split='all', dataset_type='webdataset')
|
123 |
+
|
124 |
print('------------ Now you can do your solution ---------------')
|
125 |
solution = []
|
126 |
from concurrent.futures import ProcessPoolExecutor
|