diff --git a/samgeo/samgeo.py b/samgeo/samgeo.py index 7c7e373e..1c6f1bc4 100644 --- a/samgeo/samgeo.py +++ b/samgeo/samgeo.py @@ -222,11 +222,10 @@ def generate( self.masks = masks # Store the masks as a list of dictionaries self.batch = False - if output is not None: - # Save the masks to the output path. The output is either a binary mask or a mask of objects with unique values. - self.save_masks( - output, foreground, unique, erosion_kernel, mask_multiplier, **kwargs - ) + # Save the masks to the output path. The output is either a binary mask or a mask of objects with unique values. + self.save_masks( + output, foreground, unique, erosion_kernel, mask_multiplier, **kwargs + ) def save_masks( self,