alternative image resampling when building the model