liangchen527 / SLADD

Official code for Self-supervised Learning of Adversarial Example: Towards Good Generalizations for Deepfake Detection (CVPR 2022 oral)
Apache License 2.0
131 stars 16 forks source link

In "load_image" Function of FFdata.py, how can load mask image? #14

Closed chenjunlinlin closed 1 year ago

chenjunlinlin commented 1 year ago

def load_image(self, name, idx):
    impath = '{}/{}/{:04d}.png'.format(self.data_root, name, int(idx))
    ########
    maskpath = '{}/{}/{:04d}_mask.png'.format(self.mask_root, name, int(idx))
    mask = load_mask(maskpath, size=self.res)
    ########
    img = load_rgb(impath, size=self.res)

I want to know why the name of both image and mask is Same. if label is 0, the name is real/xxx_xxx. so how can read mask? because the mask_path is mask/real/xxx_xxx. I can't find it in data folder.

chenjunlinlin commented 1 year ago
def load_image(self, name, idx):
    impath = '{}/{}/{:04d}.png'.format(self.data_root, name, int(idx))
    ########
    maskpath = '{}/{}/{:04d}_mask.png'.format(self.mask_root, name, int(idx))
    mask = load_mask(maskpath, size=self.res)
    ########
    img = load_rgb(impath, size=self.res)

I want to know why the name of both image and mask is Same. if label is 0, the name is real/xxx_xxx. so how can read mask? because the mask_path is mask/real/xxx_xxx. I can't find it in data folder.

Arg-Li commented 1 year ago

Have you solved it?