milesial / Pytorch-UNet

PyTorch implementation of the U-Net for image semantic segmentation with high quality images
GNU General Public License v3.0
9.3k stars 2.51k forks source link

Predicting batch of image arrays #496

Open deeperlearner opened 6 months ago

deeperlearner commented 6 months ago

https://github.com/milesial/Pytorch-UNet/blob/21d7850f2af30a9695bbeea75f3136aa538cfc4a/predict.py#L15-L19 This function seems to predict a PIL image a time.

How can predict_img process a batch of images. For example, full_imgs = np.random.rand(batch_size, 3, 112, 112).