diff --git a/colorize.py b/colorize.py index fbee494..3259c90 100644 --- a/colorize.py +++ b/colorize.py @@ -71,7 +71,7 @@ def main(config): ax2.imshow(post_processed) ax2.axis('off') - fig.savefig(save_path) + fig.savefig(save_path, bbox_inches='tight', pad_inches=0) if __name__ == "__main__": diff --git a/src/tester/tester.py b/src/tester/tester.py index 65630cb..71075b8 100644 --- a/src/tester/tester.py +++ b/src/tester/tester.py @@ -49,7 +49,11 @@ def _save_result(self, original_image, predicted_image): ax2.imshow(predicted_image) ax2.axis('off') - fig.savefig(os.path.join(test_save_path, str(self.cpt) + '.png')) + fig.savefig( + os.path.join(test_save_path, str(self.cpt) + '.png'), + bbox_inches='tight', + pad_inches=0 + ) self.cpt += 1