Skip to content

Commit f53ea3f

Browse files
committed
fix(process): no cluster for 0.
close #8.
1 parent 2142663 commit f53ea3f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

process.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ def run_cluster(
5757
if "dufo_label" not in data:
5858
print(f"Warning: {scene_id} {data['timestamp']} has no dufo_label, will be skipped. Better to rerun dufomap again in this scene.")
5959
continue
60-
60+
elif data["dufo_label"].sum() == 0:
61+
print(f"Warning: {scene_id} {data['timestamp']} has no dynamic points, will be skipped. Better to check this scene.")
62+
continue
63+
6164
cluster_label = np.zeros(pc0.shape[0], dtype= np.int16)
6265
hdb.fit(pc0[data["dufo_label"]==1])
6366
# NOTE(Qingwen): since -1 will be assigned if no cluster. We set it to 0.

0 commit comments

Comments
 (0)