openlifu.nav.photoscan.make_masks

openlifu.nav.photoscan.make_masks(image_paths: list[Path], output_dir: Path, threshold: float = 0.01) None[source]

Runs MODNet on a list of image paths and saves the output masks.

Each output mask is saved in output_dir using the original filename with a .png extension. The threshold parameter is used to convert the MODNet soft segmentation output into a binary (hard) mask. EXIF orientation data is preserved to ensure correct image alignment when loading into Meshroom.

Parameters:
  • image_paths (List[str]) – List of input image file paths.

  • output_dir (str) – Directory where the output masks will be saved.

  • threshold (float) – Threshold to binarize the soft segmentation output.