Use `img_as_bool` instead of `astype`