Yeo 17 mask returns zero when using masked image

So, when I use the function

masker = NiftiLabelsMasker(labels_img=yeo['thick_17'], standardize=True,
   x = masker.fit_transform(processed_file_path) # processed_file_path: skull-stripped or gray matter images.

x will be all zero.

Now when I use masker on the raw image (i.e., no masks were applied), it does return non-zero elements:

x = masker.fit_transform(raw_path)

Why is that?