ImportError: cannot import name ‘pad’ from ‘skimage.util’

Got error after upgrading skimage

It's because skimage has removed pad API starting from version 0.18 (https://github.com/scikit-image/scikit-image/issues/4147)

So we should use np.pad instead of skimage.util.pad