fix main function so as to run ICM for plant images