class_docstr: Args:
      input_shape (int): network input image size
      ori_shape (int): ori image shape of before padding
      scale_factor (float): scale factor of ori image
      enable_mkldnn (bool): whether to open MKLDNN
class_docstr_tok: ["Args",":","input_shape","(","int",")",":","network","input","image","size","ori_shape","(","int",")",":","ori","image","shape","of","before","padding","scale_factor","(","float",")",":","scale","factor","of","ori","image","enable_mkldnn","(","bool",")",":","whether","to","open","MKLDNN"]
docstr: Convert model output to lanes.
docstr_tok: ["Convert","model","output","to","lanes","."]
code: def get_lanes(self, output, as_lanes=True):
      """
      Convert model output to lanes.
      """
      softmax = nn.Softmax(axis=1)
      decoded = []
  
      for predictions in output:
          if len(predictions) == 0:
              decoded.append([])
              continue
          threshold = self.conf_threshold
          scores = softmax(predictions[:, :2])[:, 1]
          keep_inds = scores >= threshold
          predictions = predictions[keep_inds]
          scores = scores[keep_inds]
  
          if predictions.shape[0] == 0:
              decoded.append([])
              continue
          nms_predictions = predictions.detach().clone()
          nms_predictions = paddle.concat(
              x=[nms_predictions[..., :4], nms_predictions[..., 5:]],
              axis=-1,
          )
  
          nms_predictions[..., 4] = (
              nms_predictions[..., 4] * self.n_strips
          )
          nms_predictions[..., 5:] = nms_predictions[..., 5:] * (
              self.img_w - 1
          )
  
          keep = self.lane_nms(
              nms_predictions[..., 5:],
              scores,
              nms_overlap_thresh=self.nms_thres,
              top_k=self.max_lanes,
          )
  
          predictions = predictions.index_select(keep)
  
          if predictions.shape[0] == 0:
              decoded.append([])
              continue
          predictions[:, 5] = paddle.round(
              predictions[:, 5] * self.n_strips
          )
          if as_lanes:
              pred = self.predictions_to_pred(predictions)
          else:
              pred = predictions
          decoded.append(pred)
      return decoded
  
imports: import numpy
  import paddle
  import paddle.nn
  from scipy.special import softmax
  from scipy.interpolate import InterpolatedUnivariateSpline
label_desc: Use image node_id 4 for calling the CLRNetPostProcess obj's underlying member method code with example usage: obj.get_lanes(output, as_lanes) and returns: decoded