diff --git a/labelme/utils/_io.py b/labelme/utils/_io.py index ae7367f5991ff948d592e0260c641752554cdbca..82550086a392d321286de6a81901ef7cc75d3b8f 100644 --- a/labelme/utils/_io.py +++ b/labelme/utils/_io.py @@ -3,7 +3,6 @@ import os.path as osp import numpy as np import PIL.Image -from labelme.logger import logger from labelme.utils.draw import label_colormap @@ -18,7 +17,7 @@ def lblsave(filename, lbl): lbl_pil.putpalette((colormap * 255).astype(np.uint8).flatten()) lbl_pil.save(filename) else: - logger.warn( - '[%s] Cannot save the pixel-wise class label as PNG, ' - 'so please use the npy file.' % filename + raise ValueError( + '[%s] Cannot save the pixel-wise class label as PNG. ' + 'Please consider using the .npy format.' % filename )