Siromanec commited on
Commit
d406d05
1 Parent(s): 9d0230e

best mean=1.7695378948997886

Browse files

point_radius=45,
max_angle=15,
extend=25,
merge_th=80.0,
min_missing_distance=1000.0,
scale_estimation_coefficient=2.54,
clustering_eps=150,
interpolation_radius=10000,
point_radius_scale=0.5,
# dist_coeff=0,
pointcloud_depth_coeff=1.005,

removed blur
decreased number of dilations to 2
decreased kernel size to 11
decreased color range to 3.5
moved vertice stop condition after inferring the missing vertices
added mean interpolation k = 5

Files changed (2) hide show
  1. handcrafted_solution.py +26 -4
  2. script.py +1 -1
handcrafted_solution.py CHANGED
@@ -42,10 +42,32 @@ class NearestNDInterpolatorWithThreshold(si.NearestNDInterpolator):
42
  def __call__(self, *args):
43
  # Convert the input to a 2D array of query points
44
  query_points = np.array(args).T
45
- distances, indices = self.tree.query(query_points)
46
- values = np.full(query_points.shape[:-1], np.nan)
47
- valid_mask = distances <= self.max_distance
48
- values[valid_mask] = self.values[indices[valid_mask]]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  return values.T
50
  def empty_solution():
51
  '''Return a minimal valid solution, i.e. 2 vertices and 1 edge.'''
 
42
  def __call__(self, *args):
43
  # Convert the input to a 2D array of query points
44
  query_points = np.array(args).T
45
+ distances, indices = self.tree.query(query_points, k=5, distance_upper_bound=self.max_distance)
46
+ # valid_mask = distances <= self.max_distance
47
+ # print(indices)
48
+ # print(distances)
49
+ # distances = np.mean(distances, axis=1)
50
+ # print(indices)
51
+ # print(self.values)# print(distances)
52
+
53
+ found_mask = indices != len(self.values)
54
+ temp_values = np.concatenate([self.values, [0]])
55
+ values = temp_values[indices]
56
+ # values[~found_mask] = 0
57
+
58
+ values = np.sum(values, axis=1)
59
+ found_mask_sum = np.sum(found_mask, axis=1)
60
+ found_mask = found_mask_sum != 0
61
+ values[found_mask] /= found_mask_sum[found_mask]
62
+
63
+ values[~found_mask] = np.nan
64
+
65
+ # print(values)
66
+ # np.ma.masked_where(indices, found_mask)
67
+
68
+ # print(self.values[indices[found_mask]])
69
+ # values[found_mask] =
70
+ # print(values)
71
  return values.T
72
  def empty_solution():
73
  '''Return a minimal valid solution, i.e. 2 vertices and 1 edge.'''
script.py CHANGED
@@ -145,7 +145,7 @@ if __name__ == "__main__":
145
  point_radius=45,
146
  max_angle=15,
147
  extend=25,
148
- merge_th=100.0,
149
  min_missing_distance=1000.0,
150
  scale_estimation_coefficient=2.54,
151
  clustering_eps=150,
 
145
  point_radius=45,
146
  max_angle=15,
147
  extend=25,
148
+ merge_th=80.0,
149
  min_missing_distance=1000.0,
150
  scale_estimation_coefficient=2.54,
151
  clustering_eps=150,