class_docstr: Load proposal pipeline.
  
  Required key is "proposals". Updated keys are "proposals", "bbox_fields".
  
  Args:
      num_max_proposals (int, optional): Maximum number of proposals to load.
          If not specified, all proposals will be loaded.
class_docstr_tok: ["Load","proposal","pipeline",".","Required","key","is","``","proposals","''",".","Updated","keys","are","``","proposals","''",",","``","bbox_fields","''",".","Args",":","num_max_proposals","(","int",",","optional",")",":","Maximum","number","of","proposals","to","load",".","If","not","specified",",","all","proposals","will","be","loaded","."]
docstr: Call function to load proposals from file.
  
  Args:
      results (dict): Result dict from :obj:`mmdet.CustomDataset`.
  
  Returns:
      dict: The dict contains loaded proposal annotations.
docstr_tok: ["Call","function","to","load","proposals","from","file",".","Args",":","results","(","dict",")",":","Result","dict","from",":","obj",":","`","mmdet.CustomDataset","`",".","Returns",":","dict",":","The","dict","contains","loaded","proposal","annotations","."]
code: def __call__(self, results):
      """Call function to load proposals from file.
  
      Args:
          results (dict): Result dict from :obj:`mmdet.CustomDataset`.
  
      Returns:
          dict: The dict contains loaded proposal annotations.
      """
  
      proposals = results["proposals"]
      if proposals.shape[1] not in (4, 5):
          raise AssertionError(
              "proposals should have shapes (n, 4) or (n, 5), "
              f"but found {proposals.shape}"
          )
      proposals = proposals[:, :4]
  
      if self.num_max_proposals is not None:
          proposals = proposals[: self.num_max_proposals]
  
      if len(proposals) == 0:
          proposals = np.array([[0, 0, 0, 0]], dtype=np.float32)
      results["proposals"] = proposals
      results["bbox_fields"].append("proposals")
      return results
  
imports: import os.path
  import mmcv
  import numpy
  import pycocotools.mask
  from mmdet.core import BitmapMasks, PolygonMasks
  from ..builder import PIPELINES
label_desc: Use image node_id 2 for calling the LoadProposals obj's underlying member method code with example usage: obj.__call__(results) and returns: results