class_docstr: FiftyOne wrapper around YOLO-NAS from
  https://github.com/Deci-AI/super-gradients.
  
  Args:
      config: a :class:`TorchYoloNasModelConfig`
class_docstr_tok: ["FiftyOne","wrapper","around","YOLO-NAS","from","https",":","\/\/github.com\/Deci-AI\/super-gradients",".","Args",":","config",":","a",":","class",":","`","TorchYoloNasModelConfig","`"]
code: def _generate_detections(self, p):
      class_names = p.class_names
      dp = p.prediction
      img = p.image
      bboxes, confs, labels = (
          np.array(dp.bboxes_xyxy),
          dp.confidence,
          dp.labels.astype(int),
      )
      height, width, _ = img.shape
      if 0 in bboxes.shape:
          return fo.Detections(detections=[])
  
      bboxes = self._convert_bboxes(bboxes, width, height)
      labels = [class_names[l] for l in labels]
      detections = [
          fo.Detection(label=l, confidence=c, bounding_box=b)
          for (l, c, b) in zip(labels, confs, bboxes)
      ]
      return fo.Detections(detections=detections)
  
file_path: fiftyone/fiftyone/utils/super_gradients.py
imports: import logging
  import fiftyone
  import fiftyone.core.utils
  import fiftyone.utils.torch
  import fiftyone.zoo.models
  import torch
  import numpy
label_desc: Use image node_id 3 for calling the TorchYoloNasModel obj's underlying member method code with example usage: obj._generate_detections(p) and returns: fo, fo