diff --git a/maskrcnn_modanet/processimages.py b/maskrcnn_modanet/processimages.py index eb3d40f..b501baa 100644 --- a/maskrcnn_modanet/processimages.py +++ b/maskrcnn_modanet/processimages.py @@ -326,17 +326,21 @@ def extract_number(f): segment_id += 1 if not segments: - plt.figure(figsize=(15, 15)) - plt.axis('off') - plt.imshow(draw) + if not save_path: + plt.figure(figsize=(15, 15)) + plt.axis('off') + plt.imshow(draw) if not proc_img_url: print(img['file_name']) plt.show() elif save_path: + processed_image = Image.fromarray(draw, 'RGB') + processed_image.save(save_path) + del processed_image print(save_path) - plt.savefig(save_path) - plt.close() + # plt.savefig(save_path) + # plt.close() elif segments: if annotations: if save_path: diff --git a/setup.py b/setup.py index 7b9949e..b9f298c 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setuptools.setup( name='maskrcnn-modanet', - version='1.0.1.1', + version='1.0.2', # scripts=[ # 'maskrcnn_modanet/cli/main.py' # ],