Skip to content

Assertion Error in Novel Category Evaluation Due to Category Number Mismatch #18

@nightgoodl

Description

@nightgoodl

When evaluating novel categories using do_test(cfg, model, mode='novel'), an assertion error occurs in omni3d_evaluation.py:

AssertionError: assert len(class_names) == precisions.shape[2]

This error indicates a mismatch between the number of configured categories and the actual prediction categories during evaluation.

Current Implementation

  1. The evaluation process is called separately for novel and base categories:
do_test(cfg, model, mode='novel')
do_test(cfg, model, mode='base')
  1. In omni3d_evaluation.py, the evaluation uses all category names regardless of mode:
res = self._derive_omni_results(
    evals[mode],
    task,
    mode,
    class_names=self._metadata.get("thing_classes"),  # Using all categories
)

Problem

When evaluating novel categories:

  • class_names contains all categories (base + novel)
  • But precisions.shape[2] only contains novel categories
  • This mismatch triggers the assertion error

Any suggestions would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions