discard_prediction_edges#

discard_prediction_edges(windows: Iterable[Box], predictions: Iterable[np.ndarray], crop_sz: int) tuple[list['Box'], typing.Iterator[ForwardRef('np.ndarray')]][source]#

Discard the edges of predicted chips.

Parameters:
  • windows (Iterable[Box]) – The windows corresponding to the chips.

  • predictions (Iterable[np.ndarray]) – The predicted chips.

  • crop_sz (int) – Number of pixel rows/cols to discard.

Returns:

Cropped windows and chips.

Return type:

tuple[Iterator[Box], Iterator[np.ndarray]]