File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
packages/examples/cvat/exchange-oracle/src/handlers Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -1786,19 +1786,33 @@ def _validate_gt_labels(self):
17861786 for node_label in skeleton_label .nodes :
17871787 manifest_labels .add ((node_label , skeleton_label .name ))
17881788
1789- if gt_labels - manifest_labels :
1789+ if manifest_labels - gt_labels :
17901790 raise DatasetValidationError (
1791- "GT labels do not match job labels. Unknown labels: {}" .format (
1791+ "Could not find GT for labels {}" .format (
17921792 format_sequence (
17931793 [
17941794 label_name if not parent_name else f"{ parent_name } .{ label_name } "
1795- for label_name , parent_name in gt_labels - manifest_labels
1795+ for label_name , parent_name in manifest_labels - gt_labels
17961796 ]
17971797 ),
17981798 )
17991799 )
18001800
1801- # Reorder labels to match the manifest
1801+ # It should not be an issue that there are some extra GT labels - they should
1802+ # just be skipped.
1803+ if gt_labels - manifest_labels :
1804+ self .logger .info (
1805+ "Skipping unknown GT labels: {}" .format (
1806+ format_sequence (
1807+ [
1808+ label_name if not parent_name else f"{ parent_name } .{ label_name } "
1809+ for label_name , parent_name in gt_labels - manifest_labels
1810+ ]
1811+ )
1812+ )
1813+ )
1814+
1815+ # Reorder and filter labels to match the manifest
18021816 self ._input_gt_dataset .transform (
18031817 ProjectLabels , dst_labels = [label .name for label in self .manifest .annotation .labels ]
18041818 )
You can’t perform that action at this time.
0 commit comments