jacklangerman
commited on
Commit
·
da6de5a
1
Parent(s):
d8d9fce
fix typo + formatting
Browse files- README.md +2 -2
- handcrafted_solution.py +5 -3
README.md
CHANGED
@@ -13,9 +13,9 @@ The repo consistst of the following parts:
|
|
13 |
|
14 |
## Solution description
|
15 |
|
16 |
-
The solution is
|
17 |
|
18 |
-
1. Using provided (but noisy) semantic segmentation called `gestalt`, it
|
19 |
2. The vertices are connected using the same segmentation, by checking for edges classes to be present - `['eave', 'ridge', 'rake', 'valley']`.
|
20 |
3. All the "per-image" vertex predictions are merged in 3D space if their distance is less than threshold.
|
21 |
4. All vertices, which have zero connections, are removed.
|
|
|
13 |
|
14 |
## Solution description
|
15 |
|
16 |
+
The solution is simple.
|
17 |
|
18 |
+
1. Using provided (but noisy) semantic segmentation called `gestalt`, it takes the centroids of the vertex classes - `apex` and `eave_end_point` and projects them to 3D using provided (also noisy) monocular depth.
|
19 |
2. The vertices are connected using the same segmentation, by checking for edges classes to be present - `['eave', 'ridge', 'rake', 'valley']`.
|
20 |
3. All the "per-image" vertex predictions are merged in 3D space if their distance is less than threshold.
|
21 |
4. All vertices, which have zero connections, are removed.
|
handcrafted_solution.py
CHANGED
@@ -238,6 +238,8 @@ def predict(entry, visualize=False) -> Tuple[np.ndarray, List[int]]:
|
|
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,
|
242 |
-
|
243 |
-
|
|
|
|
|
|
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,
|
242 |
+
connections_3d_clean,
|
243 |
+
good_entry['wf_vertices'],
|
244 |
+
good_entry['wf_edges'])
|
245 |
+
return good_entry['__key__'], all_3d_vertices_clean, connections_3d_clean
|