From 6433aa14265ed57e58fa8805c14dc69e63ff2090 Mon Sep 17 00:00:00 2001 From: Abel Soares Siqueira Date: Tue, 27 Jun 2023 12:03:06 +0200 Subject: [PATCH] Skip files that don't have enough points to create a neighbourhood --- bird_cloud_gnn/radar_dataset.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bird_cloud_gnn/radar_dataset.py b/bird_cloud_gnn/radar_dataset.py index 07ae1f5..501036b 100644 --- a/bird_cloud_gnn/radar_dataset.py +++ b/bird_cloud_gnn/radar_dataset.py @@ -116,6 +116,11 @@ def _process_data(self, data, origin=""): ) ].index ).reset_index(drop=True) + if len(data) < self.num_neighbours: + print( + f"Warning: There are not enough points to find {self.num_neighbours} neighbourhood" + ) + return data_xyz = data[xyz] # remove the special features so they can be generated later