Sem Image Reduction And Analysis For Machine Learning Optimization of Metal Halide Perovskites