Python Code for analyzing imagery dataset