Skip to content

Commit

Permalink
Merge pull request #367 from openfoodfacts/export-ls-to-hf-was-cancelled
Browse files Browse the repository at this point in the history
feat: 🎨 Consider "was_cancelled" during export from ls to hf
  • Loading branch information
jeremyarancio authored Dec 4, 2024
2 parents b8b3a1a + c1b8f8a commit 7bd75a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ml_utils/ml_utils_cli/cli/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ def format_object_detection_sample_to_hf(
return None

annotation = annotations[0]
if annotation["was_cancelled"]:
logger.debug("Annotation was cancelled, skipping.")
return None

bboxes = []
bbox_category_ids = []
bbox_category_names = []
Expand Down

0 comments on commit 7bd75a3

Please sign in to comment.