colin1842 commited on
Commit
592de42
·
verified ·
1 Parent(s): 88c3f63

Upload 2 files

Browse files
Files changed (1) hide show
  1. feature_solution.py +1 -2
feature_solution.py CHANGED
@@ -624,7 +624,6 @@ def predict(entry, visualize=False) -> Tuple[np.ndarray, List[int]]:
624
  # save_image_with_lines(f'line_{i}.png', np.array(good_entry['gestalt'][i]), line_0, (255, 0, 0))
625
  # save_image_with_lines(f'line_{j}.png', np.array(good_entry['gestalt'][j]), line_1, (255, 0, 0))
626
 
627
-
628
  # Triangulation with matched keypoints
629
  R_0 = good_entry['R'][i]
630
  t_0 = good_entry['t'][i]
@@ -639,13 +638,13 @@ def predict(entry, visualize=False) -> Tuple[np.ndarray, List[int]]:
639
  connections = [(0,1)]
640
  # ours method
641
  vert_edge_per_image[i] = connections, points_3d
642
-
643
 
644
  all_3d_vertices, connections_3d = merge_vertices_3d_ours(vert_edge_per_image, 3.0)
645
 
646
  # all_3d_vertices_clean, connections_3d_clean = prune_not_connected(all_3d_vertices, connections_3d)
647
  all_3d_vertices_clean = all_3d_vertices
648
  connections_3d_clean = connections
 
649
  if (len(all_3d_vertices_clean) < 2) or len(connections_3d_clean) < 1:
650
  print (f'Not enough vertices or connections in the 3D vertices')
651
  return (good_entry['__key__'], *empty_solution())
 
624
  # save_image_with_lines(f'line_{i}.png', np.array(good_entry['gestalt'][i]), line_0, (255, 0, 0))
625
  # save_image_with_lines(f'line_{j}.png', np.array(good_entry['gestalt'][j]), line_1, (255, 0, 0))
626
 
 
627
  # Triangulation with matched keypoints
628
  R_0 = good_entry['R'][i]
629
  t_0 = good_entry['t'][i]
 
638
  connections = [(0,1)]
639
  # ours method
640
  vert_edge_per_image[i] = connections, points_3d
 
641
 
642
  all_3d_vertices, connections_3d = merge_vertices_3d_ours(vert_edge_per_image, 3.0)
643
 
644
  # all_3d_vertices_clean, connections_3d_clean = prune_not_connected(all_3d_vertices, connections_3d)
645
  all_3d_vertices_clean = all_3d_vertices
646
  connections_3d_clean = connections
647
+
648
  if (len(all_3d_vertices_clean) < 2) or len(connections_3d_clean) < 1:
649
  print (f'Not enough vertices or connections in the 3D vertices')
650
  return (good_entry['__key__'], *empty_solution())