class_docstr: Internal wrapper read entries in pd.DataFrame as images/labels.
  
  Parameters
  ----------
  dataset : ObjectDetectionDataset
      DataFrame as ObjectDetectionDataset.
class_docstr_tok: ["Internal","wrapper","read","entries","in","pd.DataFrame","as","images\/labels",".","Parameters","--","--","--","--","--","dataset",":","ObjectDetectionDataset","DataFrame","as","ObjectDetectionDataset","."]
code: def __getitem__(self, idx):
      im_path = self._dataset["image"][idx]
      rois = self._dataset["rois"][idx]
      img = self._imread(im_path)
      width, height = img.shape[1], img.shape[0]
  
      def convert_entry(roi):
          return [
              float(roi[key])
              for key in ["xmin", "ymin", "xmax", "ymax"]
          ] + [
              self.classes.index(roi["class"]),
              float(roi.get("difficult", 0)),
          ]
  
      label = np.array([convert_entry(roi) for roi in rois])
      label[:, (0, 2)] *= width
      label[:, (1, 3)] *= height
      return img, label
  
imports: import logging
  import os
  from pathlib import Path
  import warnings
  import numpy
  import pandas
  import matplotlib.pyplot
  from PIL import Image
  import cv2
  from ..data import is_url, url_data
  from ...utils.filesystem import import_try_install
  from ...utils.bbox import bbox_xywh_to_xyxy, bbox_clip_xyxy
label_desc: Use image node_id 3 for calling the _MXObjectDetectionDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: img,  label, unknown