File size: 252 Bytes
e22b55b
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
from tensorflow.keras.preprocessing.image import img_to_array

class ImgtoArrPrePro:
    def __init__(self,dataFormat=None):
        self.dataFormat=dataFormat

    def preprocess(self,img):

        return img_to_array(img,data_format=self.dataFormat)