class_docstr: Base class for defining detection loss functions. Sub-classes must implement forward function.
  
  Args:
      opts: command line arguments
class_docstr_tok: ["Base","class","for","defining","detection","loss","functions",".","Sub-classes","must","implement","forward","function",".","Args",":","opts",":","command","line","arguments"]
code: def add_arguments(
      cls, parser: argparse.ArgumentParser
  ) -> argparse.ArgumentParser:
      if cls != BaseDetectionCriteria:
          # Don't re-register arguments in subclasses that don't override `add_arguments()`.
          return parser
  
      group = parser.add_argument_group(cls.__name__)
      group.add_argument(
          "--loss.detection.name",
          type=str,
          default=None,
          help=f"Name of the loss function in {cls.__name__}. Defaults to None.",
      )
      return parser
  
imports: import argparse
  from loss_fn import LOSS_REGISTRY, BaseCriteria
label_desc: Use image node_id 2 for calling the BaseDetectionCriteria obj's underlying member method code with example usage: obj.add_arguments(cls, parser) and returns: parser, parser