Python Image To Tensor Processing