Skip to content

Commit 64553ef

Browse files
committed
fix: remove duplicates after spatial sampling
1 parent 514ccb8 commit 64553ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mapswipe_workers/mapswipe_workers/utils/process_mapillary.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,14 @@ def get_image_metadata(
229229
raise CustomError(
230230
"No Mapillary Features in the AoI or no Features match the filter criteria."
231231
)
232-
downloaded_metadata = downloaded_metadata.drop_duplicates(subset=["geometry"])
233232
if sampling_threshold is not None:
234233
downloaded_metadata = spatial_sampling(downloaded_metadata, sampling_threshold)
235234

236235
if randomize_order is True:
237236
downloaded_metadata = downloaded_metadata.sample(frac=1).reset_index(drop=True)
238237

238+
downloaded_metadata = downloaded_metadata.drop_duplicates(subset=["geometry"])
239+
239240
total_images = len(downloaded_metadata)
240241
if total_images > 100000:
241242
raise CustomError(

0 commit comments

Comments
 (0)