nucleus.evaluation_v2_exclusions ================================ .. py:module:: nucleus.evaluation_v2_exclusions .. autoapi-nested-parse:: Exclusion rules for Evaluation V2 creation. These rules drop items/annotations from an evaluation before metrics are computed. Each rule is validated when the evaluation is created; anything rejected is reported back with the reason, so a malformed rule fails loudly rather than silently excluding nothing. Pass instances (or equivalent plain dicts) to :meth:`nucleus.NucleusClient.create_benchmark_evaluation_v2` via ``exclusion_rules``:: client.create_benchmark_evaluation_v2( benchmark_id, model_run_id, exclusion_rules=[ BoxAreaExclusionRule(scope="annotation", target="groundTruth", min=1024), LabelExclusionRule(scope="item", target="prediction", labels=["ignore"]), MetadataExclusionRule(key="is_dark", op="EQ", value=True), ], ) .. autoapisummary:: nucleus.evaluation_v2_exclusions.BoxAreaExclusionRule nucleus.evaluation_v2_exclusions.LabelExclusionRule nucleus.evaluation_v2_exclusions.MetadataExclusionRule .. py:class:: BoxAreaExclusionRule Exclude boxes whose pixel area falls outside ``[min, max]`` (at least one bound required). :param scope: ``"item"`` or ``"annotation"``. :param target: ``"groundTruth"`` or ``"prediction"``. :param min: Minimum pixel area (inclusive lower bound), or ``None``. :param max: Maximum pixel area (inclusive upper bound), or ``None``. .. py:class:: LabelExclusionRule Exclude annotations/predictions (or whole items) carrying any of ``labels``. :param scope: ``"item"`` (drop the whole item if any annotation matches) or ``"annotation"`` (drop only matching annotations). :param target: ``"groundTruth"`` or ``"prediction"`` — which side to filter. :param labels: Labels to exclude. .. py:class:: MetadataExclusionRule Exclude whole items whose item-metadata ``key`` matches ``value`` under ``op``. ``scope`` is always ``"item"`` for metadata rules.