docstr: Args:
      mask: np.ndarray of np.float elements
          Mask values between 0 and 1 (should have a shape of height*width)
      mask_threshold: float
          Value to threshold mask pixels between 0 and 1
      shift_amount: List
          To shift the box and mask predictions from sliced image
          to full sized image, should be in the form of [shift_x, shift_y]
      full_shape: List
          Size of the full image after shifting, should be in the form of [height, width]
docstr_tok: ["Args",":","mask",":","np.ndarray","of","np.float","elements","Mask","values","between","0","and","1","(","should","have","a","shape","of","height","*","width",")","mask_threshold",":","float","Value","to","threshold","mask","pixels","between","0","and","1","shift_amount",":","List","To","shift","the","box","and","mask","predictions","from","sliced","image","to","full","sized","image",",","should","be","in","the","form","of","[","shift_x",",","shift_y","]","full_shape",":","List","Size","of","the","full","image","after","shifting",",","should","be","in","the","form","of","[","height",",","width","]"]
code: def from_float_mask(
      cls,
      mask,
      full_shape=None,
      mask_threshold: float = 0.5,
      shift_amount: list = [0, 0],
  ):
      """
      Args:
          mask: np.ndarray of np.float elements
              Mask values between 0 and 1 (should have a shape of height*width)
          mask_threshold: float
              Value to threshold mask pixels between 0 and 1
          shift_amount: List
              To shift the box and mask predictions from sliced image
              to full sized image, should be in the form of [shift_x, shift_y]
          full_shape: List
              Size of the full image after shifting, should be in the form of [height, width]
      """
      bool_mask = mask > mask_threshold
      return cls(
          bool_mask=bool_mask,
          shift_amount=shift_amount,
          full_shape=full_shape,
      )
  
imports: import copy
  from typing import Dict, List, Optional
  import numpy
  from sahi.utils.coco import CocoAnnotation, CocoPrediction
  from sahi.utils.cv import get_bbox_from_bool_mask, get_bool_mask_from_coco_segmentation, get_coco_segmentation_from_bool_mask
  from sahi.utils.shapely import ShapelyAnnotation
label_desc: Use image node_id 1 for calling the Mask obj's underlying member method code with example usage: obj.from_float_mask(cls, mask, full_shape, mask_threshold, shift_amount) and returns: cls