class_docstr: Test class collection different tests for different properties parametrized by backend argument.
class_docstr_tok: ["Test","class","collection","different","tests","for","different","properties","parametrized","by","backend","argument","."]
docstr: One good detection, one false negative.
  
  Map should be lower than 1. Actually it is 0.5, but the exact value depends on where we are sampling (i.e.
  recall's values)
docstr_tok: ["One","good","detection",",","one","false","negative",".","Map","should","be","lower","than","1",".","Actually","it","is","0.5",",","but","the","exact","value","depends","on","where","we","are","sampling","(","i.e",".","recall","'s","values",")"]
code: def test_missing_pred(self, backend):
      """One good detection, one false negative.
  
      Map should be lower than 1. Actually it is 0.5, but the exact value depends on where we are sampling (i.e.
      recall's values)
  
      """
      gts = [
          {
              "boxes": Tensor([[10, 20, 15, 25]]),
              "labels": IntTensor([0]),
          },
          {
              "boxes": Tensor([[10, 20, 15, 25]]),
              "labels": IntTensor([0]),
          },
      ]
      preds = [
          {
              "boxes": Tensor([[10, 20, 15, 25]]),
              "scores": Tensor([0.9]),
              "labels": IntTensor([0]),
          },
          # Empty prediction
          {
              "boxes": Tensor([]),
              "scores": Tensor([]),
              "labels": IntTensor([]),
          },
      ]
      metric = MeanAveragePrecision(backend=backend)
      metric.update(preds, gts)
      result = metric.compute()
      assert (
          result["map"] < 1
      ), "MAP cannot be 1, as there is a missing prediction."
  
imports: import contextlib
  import io
  import json
  from copy import deepcopy
  from functools import partial
  from itertools import product
  import numpy
  import pytest
  import torch
  from lightning_utilities import apply_to_collection
  from pycocotools.coco import COCO
  from pycocotools.cocoeval import COCOeval
  from torch import IntTensor, Tensor
  from torchmetrics.detection.mean_ap import MeanAveragePrecision
  from torchmetrics.utilities.imports import _FASTER_COCO_EVAL_AVAILABLE, _PYCOCOTOOLS_AVAILABLE, _TORCHVISION_GREATER_EQUAL_0_8
  from unittests.detection import _DETECTION_BBOX, _DETECTION_SEGM, _DETECTION_VAL
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 11 for calling the TestMapProperties obj's underlying member method code with example usage: obj.test_missing_pred(backend) without return types