@JuanFMontesinos I hope you could help me again, please? I’m still having an issue with running the model - It keeps running out of memory.  Even after reducing the size of the image. Each step during the training takes a long time to complete. I think the issue is with the snippet of code below, where I  read the image then split by color. If i run the model without the the image slpit it works okay, but i need to spit the image by channel to do the counting. I have tried changing the batch size to 8 from 16. The only different in this model is also the change to grayscale which i don’t seem to be able to becuase the image is in PIL format. Can you suggest anything please?
 def __getitem__(self, idx):
        path = self.files[idx]

        img = imread(filename=path)
        sample = resize(src=img, dsize=(1024, 1024))
        #sample = functional.to_grayscale(sample, num_output_channels=3)
        #image = cv2.imread(path)

        sample[:, :, 0] = 0
        sample[:, :, 1] = 0