Search code examples
gpujupyterimage-resizing

Jupyter kernel dying while loading images for training? How to keep aspect ratio intact?


My jupyter kernel is dying when I try to load images without a target size. It exactly stops after 4%. There are about 12000 images. When I am putting 128,128 in target_size. It does fine. I am using tensorflow gpu with 8gb graphic card. My main purpose is to keep aspect ratio of the images same, so I want to refrain from resizing or if there is any way to input only one dimension and automatically take the other dimension according to aspect ratio? All inputs are appreciated, thanks.

Also, if anyone can let me know why is it crashing because I typed nvidia-smi on terminal and it shows only a fraction of gpu memory utilized. Most of my images are 1536x2048, others are 880x something.


Solution

  • It was a memory issue. It was solved.