polimi-ispl / icpr2020dfdc

Video Face Manipulation Detection Through Ensemble of CNNs
GNU General Public License v3.0
259 stars 100 forks source link

About test in ffpp dataset #50

Closed IItaly closed 3 years ago

IItaly commented 3 years ago

Hey Thanks for your work @CrohnEngineer I noted that https://github.com/polimi-ispl/icpr2020dfdc/blob/7ae2c9bf7174b8f93040fa425715cb22e9804529/isplutils/split.py#L57

Does this mean that only real videos are used for train/val/test's segmentation ?

CrohnEngineer commented 3 years ago

Hey @IItaly ,

thanks for passing by! If you look at the code starting from line 62 we insert frames from FAKE videos that have been generated from the REAL videos taken at line 57. In the end all splits have both REAL and FAKE videos. Bests,

Edoardo

IItaly commented 3 years ago

Thank u ~ You are right.

CrohnEngineer commented 3 years ago

You're welcome, feel free to open another issue or look into the other threads if you need additional info :) Bests,

Edoardo

IItaly commented 3 years ago

I found that after I indexed the ffpp dataset,the original videos's original value will be "-1",and the fake videos's original value will be other numbers.So I guess that Maybe my way of organizing datasets is different from yours. image

CrohnEngineer commented 3 years ago

The original column corresponds to the index of the original video from which the FAKE video has been generated. REAL videos will have as original -1, as they obviously are not generated from any other video. Doesn't seem to me that your indexing is different from ours, but I can check if you want!

IItaly commented 3 years ago

If I don't understand it wrong,It means that the "-1" has no problem.But other fake videos' [original] value are strange. When I divided the ffpp dataset, only the real video can be detected through the codes at line 62. So I think it's the index's problem, but I haven't modified index_ffpp.py, so I think it's the way we organized datasets differently. This is my folder structure. Is it similar to yours? image

CrohnEngineer commented 3 years ago

But other fake videos' [original] value are strange. When I divided the ffpp dataset, only the real video can be detected through the codes at line 62.

The index you have is fine, as well as the original column. I think the problem is another one. From the picture of the DataFrame you have posted, it seems that you have all videos at quality factor c0 or c40. For our experiments instead, we only used videos at quality factor c23: if you look at line 56, from the string ff-c23-720-140-140 we take the quality factor c23, and use that to select both REAL and FAKE videos. If the FF++ dataset you have doesn't present c23 quality videos, then that would explain your issues with the splits. Let us know! Bests,

Edoardo

IItaly commented 3 years ago

Hey @CrohnEngineer I checked that my FF++ dataset.Every class has the present c23 quality videos.However, the indexes of c23 fake video and real video do not match.Just like the c23 real video start from index 13000 to 14000, and the c23 fake video's [original] values are not between 13000 and 14000. image image image image image

CrohnEngineer commented 3 years ago

Hey @IItaly ,

now you are showing me the faces DataFrame right? It is OK that the index of the entries do not match with the column video, as in the faces DataFrame you will have a record for each face found in each video sample, so there will be more records referring to a single video index (one for each face extracted from it). The column original then will always refer to the video index, not the faces indexes, as there might not be a 1:1 correspondance between each frame of the FAKE and REAL video. Anyway, sorry but I'm not sure at this point what exactly your issue is. Your splits do not have both REAL and FAKE videos? Let me know! Bests,

Edoardo

IItaly commented 3 years ago

Sorry for the late reply because of the exam. The proplem is that I failed to split the dataset(ff-c23) even I have the full dataset and every folder has 1000 videos. When I split it , it will show that I just only have the c23 quality real videos. However I could use the c40 part.

CrohnEngineer commented 3 years ago

Hey @IItaly ,

sounds good to me :) glad you have found the reason behind your issue!

IItaly commented 3 years ago

Thanks for your reply.Finally I split the c23 part in other ways :) image