Siromanec commited on
Commit
8f00d62
·
1 Parent(s): 8aec4b7

clustering_eps=150

Browse files
Files changed (2) hide show
  1. handcrafted_solution.py +2 -2
  2. script.py +1 -0
handcrafted_solution.py CHANGED
@@ -430,7 +430,7 @@ def prune_not_connected(all_3d_vertices, connections_3d):
430
  return np.array(new_verts), connected_out
431
 
432
 
433
- def predict(entry, visualize=False, scale_estimation_coefficient=2.5, **kwargs) -> Tuple[np.ndarray, List[int]]:
434
  if 'gestalt' not in entry or 'depthcm' not in entry or 'K' not in entry or 'R' not in entry or 't' not in entry:
435
  print('Missing required fields in the entry')
436
  return (entry['__key__'], *empty_solution())
@@ -450,7 +450,7 @@ def predict(entry, visualize=False, scale_estimation_coefficient=2.5, **kwargs)
450
 
451
  # print(len(points))
452
 
453
- clustered = DBSCAN(eps=100, min_samples=10).fit(points).labels_
454
  clustered_indices = np.argsort(clustered)
455
 
456
  points = points[clustered_indices]
 
430
  return np.array(new_verts), connected_out
431
 
432
 
433
+ def predict(entry, visualize=False, scale_estimation_coefficient=2.5, clustering_eps = 100, **kwargs) -> Tuple[np.ndarray, List[int]]:
434
  if 'gestalt' not in entry or 'depthcm' not in entry or 'K' not in entry or 'R' not in entry or 't' not in entry:
435
  print('Missing required fields in the entry')
436
  return (entry['__key__'], *empty_solution())
 
450
 
451
  # print(len(points))
452
 
453
+ clustered = DBSCAN(eps=clustering_eps, min_samples=10).fit(points).labels_
454
  clustered_indices = np.argsort(clustered)
455
 
456
  points = points[clustered_indices]
script.py CHANGED
@@ -137,6 +137,7 @@ if __name__ == "__main__":
137
  merge_th=100.0,
138
  min_missing_distance=30000000.0,
139
  scale_estimation_coefficient=2.54,
 
140
  ))
141
 
142
  for i, result in enumerate(tqdm(results)):
 
137
  merge_th=100.0,
138
  min_missing_distance=30000000.0,
139
  scale_estimation_coefficient=2.54,
140
+ clustering_eps=150,
141
  ))
142
 
143
  for i, result in enumerate(tqdm(results)):