dessa-oss/DeepFake-Detection

What is the purpose of Collate fn

jaideep11061982 opened this issue · 1 comments

Thanks for creating this repository . could u please explain out the purpose of collate in dataloader

Hi,

Sorry for the late reply. As confusing as it may seem, collate is actually there to handle if a sample has a bad/non-existent face crop. dlib sometimes messes up the crop or simply doesn't find faces in a video, and the collate is there to typically get rid of such samples from the batch. Keep in mind this might result in a batch of supposedly 32 images having only 28 images.

I hope this answers your question.