mjkwon2021 / CAT-Net

Official code for CAT-Net: Compression Artifact Tracing Network. Image manipulation detection and localization.
222 stars 26 forks source link

dataset processing #16

Open dan326326 opened 2 years ago

dan326326 commented 2 years ago

Hello,Thank you for your wonderful code!I see COLUMB data set is used in the paper, may I ask how do you deal with the mask of this data set

CauchyComplete commented 2 years ago

Hi, You may use the masks in the edgemask directory in 4cam_splc with a proper threshold (like 120/255).

I've done this by:

mask = np.array(Image.open(mask_path))[:,:,1]
mask[mask <= 120] = 0
mask[mask > 0] = 1