I have to classfier a medical images, but these images are big(3000x2900),, i need way to resize. and then training it. Can i training these images without resize???
Asked
Active
Viewed 9,773 times
-5
-
1https://stackoverflow.com/questions/37631611/python-how-to-resize-an-image-using-pil-module – Vaibhav Vishal Aug 26 '19 at 09:58
-
can i please training these images without resize? – Mahmoud Smaida Aug 26 '19 at 10:26
-
Then train without resizing, whats the big deal. – Vaibhav Vishal Aug 26 '19 at 10:27
1 Answers
4
You can train your model without resizing your pictures . But it will be time consuming. And you may not get the best results. I recommend you resize them to 128x128 pixels. You can use the PIL library and resize each picture then save it to a different directory.
from PIL import Image
img = Image.open('/your iamge path/image.jpg') # image extension *.png,*.jpg
new_width = 128
new_height = 128
img = img.resize((new_width, new_height), Image.ANTIALIAS)
img.save('/new directory path/output image name.png') # format may what u want ,*.png,*jpg,*.gif
This process is called preprocessing the dataset.

moe asal
- 750
- 8
- 24
-
Thanks alot,, , could you please tell me how i can create my dataset to use my dataset instead of using mnist dataset?((((from keras.datasets import mnist))) i want to import my dataset – Mahmoud Smaida Aug 26 '19 at 14:04
-
-
But hey, this url might help you.https://elitedatascience.com/keras-tutorial-deep-learning-in-python – moe asal Aug 26 '19 at 14:07