Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in extract_faces.py #19

Closed
chinmaynehate opened this issue Mar 16, 2021 · 4 comments
Closed

Error in extract_faces.py #19

chinmaynehate opened this issue Mar 16, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@chinmaynehate
Copy link
Contributor

chinmaynehate commented Mar 16, 2021

  • I first ran the index_dfdc.py file from which a .pkl file was generated
  • Next, I ran the extract_faces file by providing the paths of source, videodf, facesfolder, facesdf and checkpoint directories. I got the following error. I haven't modified the code.
    error
@CrohnEngineer
Copy link
Collaborator

Hey @chinmaynehate ,

thanks for checking out our code!
It seems you found a little bug in our pipeline: indeed, the extract_faces.py script looks for a field class in the video DataFrame created with index_*.py, but this field is created only for the FF++ dataset (if I'm not mistaken, it indicates the different categories of the manipulated videos, which is an info not available at the time we wrote the code for the DFDC dataset).
I'll fix it in the next committ, but it might take me a while as I might need to re-run the pipeline.
In the meantime, you could try this temporary "patch".
The line giving you this error is the 243 of extract_faces.py, where a DataFrame containing the info of the faces extracted from a video N is created. You should remove the fields 'class', 'quality' and 'source', and everything should run fine.
Something along this line:

face_dict = {'facepath': str(face_path.relative_to(facedestination_dir)), 'video': idx,
                    'label': record['label'], 'videosubject': subj_id, 'original': record['original']}

Let me know if that works, and thank you for spotting this!
Bests,

Edoardo

@CrohnEngineer CrohnEngineer added the bug Something isn't working label Mar 17, 2021
CrohnEngineer added a commit that referenced this issue Mar 17, 2021
separate unique ff++ attributes, target #19
@CrohnEngineer
Copy link
Collaborator

Hey @chinmaynehate ,

with this last commit we should have fixed the bug you found.
If you haven't tried the patch I suggested you yet, try cloning the master branch and repeat the faces extraction process with the updated extract_faces.py.
Let us know if you have any other problem, and thanks again for the catch!
Bests,

Edoardo

@chinmaynehate
Copy link
Contributor Author

Hey,
Thank you for your help!
I ran the fixed code of extract_faces.py from the master branch on some part of the dfdc dataset. Your latest commit has fixed the issue that I had raised earlier. I want to bring to your attention another small issue.

After running the latest extract_faces.py:

  • As expected, all the extracted faces were stored in the path given in --facesfolder argument which is the faces output directory.
  • But the Output DataFrame of faces which were supposed to be saved in the path given in --facesdf(for me it was icpr2020dfdc/facesdf folder). But the Output DataFrame( i.e. .pkl file) got saved in the icpr2020dfdc/ folder itself( which is not the folder given as --facesdf argument)

result

Thank you

@nicobonne
Copy link
Member

Since the original problem seems to be solved, let's discuss this in a new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants