refactoring to contain mapillary into the iamge mode