Optimizing Deep Learning for Imbalanced Image Data