milesial / Pytorch-UNet

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

Predicting batch of image arrays #496

Open deeperlearner opened 1 month ago

deeperlearner commented 1 month 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).