davidtvs / PyTorch-ENet

PyTorch implementation of ENet
MIT License
383 stars 129 forks source link

save all the images #49

Closed Robinxin123 closed 3 years ago

Robinxin123 commented 3 years ago

hello, thanks for your nice work.
I got a question, how can I save all the test segmented images, not the the batch of them. I have checked the function predict and imshow_batch, but don't find the answer.

many thanks

davidtvs commented 3 years ago

In the predict function, here, you can iterate through the batch of segmented images (the first dimension of the 4D Tensor), convert to numpy and then save them with matplotlib.pyplot.savefig.

If it's still not clear, let me know and I'll try to give example code

Robinxin123 commented 3 years ago

thanks for the reply, I have already solved it.