sassoftware / python-dlpy

The SAS Deep Learning Python (DLPy) package provides the high-level Python APIs to deep learning methods in SAS Visual Data Mining and Machine Learning. It allows users to build deep learning models using friendly Keras-like APIs.
Apache License 2.0
224 stars 131 forks source link

Save semantic segmentation predictions as .png #375

Closed cshruti87 closed 2 years ago

cshruti87 commented 3 years ago

Hello Experts,

I am doing Semantic Segmentation using SAS DLPy UNET model for which I referred the example notebook posted on this github page. Now I have a trained model saved as .sashdat and I load it and am trying to use it for completely new out of the box data. I used model.predict which gives output in the form of CAS table. But I want to check the results by displaying and saving the images (predicted outputs). Is there a pre-available function to do that in utils or is there an easy way to accomplish this task?

Thanks in advance!

dxq77dxq commented 3 years ago

Hello,

display_segmentation_results can display the predicted images. While there are no pre-defined APIs that can save predicted images to disk, you can convert the predicted images to np array and use opencv to save them as PNGs.