code: def _predict_batch(
      model: nn.Module,
      batch: Sequence[torch.Tensor],
      records: Sequence[BaseRecord],
      detection_threshold: float = 0.5,
      keep_images: bool = False,
      device: Optional[torch.device] = None,
  ):
      model.eval()
      device = device or model_device(model)
      batch = [o.to(device) for o in batch]
  
      raw_preds = model(*batch)
      return convert_raw_predictions(
          batch=batch,
          raw_preds=raw_preds,
          records=records,
          detection_threshold=detection_threshold,
          keep_images=keep_images,
      )
  
file_path: icevision/icevision/models/torchvision/faster_rcnn/prediction.py
imports: from icevision.imports import *
  from icevision.utils import *
  from icevision.core import *
  from icevision.models.utils import _predict_from_dl
  from icevision.data import *
  from icevision.models.torchvision.dataloaders import *
  from icevision.models.inference import *
label_desc: Use image node_id 1 for calling a global function with example usage: _predict_batch(model, batch, records, detection_threshold, keep_images, device) and returns: convert_raw_predictions