davidecannatanuig / openFaceR

Methods for using OpenFace in R
11 stars 0 forks source link

Error in merge_face (i think) #6

Open ukiera opened 1 year ago

ukiera commented 1 year ago

Hello !

I have been trying to use OpenFaceR for a few days, I encountered some issues that i managed to resolved but this time i can't figure out what I'm supposed to do. I am mostly interested by the AUs feature of OpenFace and I'm currently working on comparing their occurences for one subject in 3 different conditions, which are 3 different videos and so CSVs.

This is my script atm :

faces<-read_face_csvs(output_dir="F:/Video/sortie openface/") test_faces %>% select_faces(starts_with("AU")) %>% tidy_face(continuous = FALSE, events_sum = "count")

The result is this error : image I'm not really familiar with dplyr and don't know what to do know

davidecannatanuig commented 1 year ago

Dear user,

Thank you so much for contacting me. I hope that openfaceR is useful for you - and I am very curious about your study.

It is hard to know exactly what is going on without access to your dataset, but it seems to be a simple problem with the names of your variables.

Indeed, OpenfaceR is searching for a variable called "ID" that represents the identification code of the person you are studying. Most likely, you either did not create an identification variable (this might happen if you are working only with one video), or you used a different name for that variable.

Once you correct the issue your code should work.

Let me know if this helps!

Best, Davide


From: ukiera @.> Sent: 06 April 2023 09:36 To: davidecannatanuig/openFaceR @.> Cc: Subscribed @.***> Subject: [davidecannatanuig/openFaceR] Error in merge_face (i think) (Issue #6)

EXTERNAL EMAIL: This email originated outside the University of Galway. Do not open attachments or click on links unless you believe the content is safe. RÍOMHPHOST SEACHTRACH: Níor tháinig an ríomhphost seo ó Ollscoil na Gaillimhe. Ná hoscail ceangaltáin agus ná cliceáil ar naisc mura gcreideann tú go bhfuil an t-ábhar sábháilte.

Hello !

I have been trying to use OpenFaceR for a few days, I encountered some issues that i managed to resolved but this time i can't figure out what I'm supposed to do. I am mostly interested by the AUs feature of OpenFace and I'm currently working on comparing their occurences for one subject in 3 different conditions, which are 3 different videos and so CSVs.

This is my script atm :

faces<-read_face_csvs(output_dir="F:/Video/sortie openface/") test_faces %>% select_faces(starts_with("AU")) %>% tidy_face(continuous = FALSE, events_sum = "count")

The result is this error : [image]https://user-images.githubusercontent.com/103002657/230321828-8019517e-b9ab-4bc0-883a-ed1ca568924e.png I'm not really familiar with dplyr and don't know what to do know

— Reply to this email directly, view it on GitHubhttps://github.com/davidecannatanuig/openFaceR/issues/6, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQNUTLTK5UQRPXIZDUCWYHTW7Z57ZANCNFSM6AAAAAAWVDDU2A. You are receiving this because you are subscribed to this thread.Message ID: @.***>

ukiera commented 1 year ago

Hello !

The study just started so I can't say a lot about it but publications are expected in a few months hopefully !

Actually I imported 3 videos of the same subject, in 3 different conditions. I didn't see where I could create ID which is, indeed, what I was expecting to be the source of the error. The datasets come straight out of OpenFace and I didn't change anything to them. Could you tell me how I'm supposed to create the ID ?

Thank you,

Emeline

davidecannatanuig commented 1 year ago

Hello Emeline,

I do not know why this is not working for you, but this is how the function works.

The input is a list of dataframes (the outputs from openface).

By using read_faces you should be able to import the list in the right format.

Tidyface calls in the background a function called merge_faces, which is where you are having troubles with. Merge faces creates a variable called ID by using the names of the elements of the list.

For so.e reason this is failing in your case. As I cannot access to your datasets I do not know why this is not happening. My guess is that you did not save the test_faces dataframe in the correct list format. Could that be the case? For being more accurate in my assessment i should have a look at your data. We can arrange a screenshare session if you want.

Best Regards, Davide


From: ukiera @.> Sent: 11 April 2023 19:43 To: davidecannatanuig/openFaceR @.> Cc: CANNATA, DAVIDE @.>; Comment @.> Subject: Re: [davidecannatanuig/openFaceR] Error in merge_face (i think) (Issue #6)

EXTERNAL EMAIL: This email originated outside the University of Galway. Do not open attachments or click on links unless you believe the content is safe. RÍOMHPHOST SEACHTRACH: Níor tháinig an ríomhphost seo ó Ollscoil na Gaillimhe. Ná hoscail ceangaltáin agus ná cliceáil ar naisc mura gcreideann tú go bhfuil an t-ábhar sábháilte.

Hello !

The study just started so I can't say a lot about it but publications are expected in a few months hopefully !

Actually I imported 3 videos of the same subject, in 3 different conditions. I didn't see where I could create ID which is, indeed, what I was expecting to be the source of the error. The datasets come straight out of OpenFace and I didn't change anything to them. Could you tell me how I'm supposed to create the ID ?

Thank you,

Emeline

— Reply to this email directly, view it on GitHubhttps://github.com/davidecannatanuig/openFaceR/issues/6#issuecomment-1503904815, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQNUTLQJIPLW5B63F54OFGLXAWQ6DANCNFSM6AAAAAAWVDDU2A. You are receiving this because you commented.Message ID: @.***>

ukiera commented 1 year ago

Hello !

I would love a screen share session but as english is not my first language i would probably be more focused on that than on the problem and it would be counter productive.

As for my data, you'll find attached some of the datasets that I tried to use. For context, in this study we want to know if interacting with horses is beneficial both for the horse and the human. To do so, we record the face of our participants before (ct1), during (int) and after (ct2) interacting with their horses. "A" is the condition since we would like to test if it's the horse or slowly stroking a soft surface that affects our participant. The number following is the id of our participant. So A4ct1 refers to the video preceding the interaction of participant 4 with her horse.

I kind of blindly followed the instructions on your pdf so I have no idea if I changed the list format.

Thanks for your time,

Emeline

A4 ct2 short.csv https://drive.google.com/file/d/10EBGb1Cnq4RN7ih51Ny4vB38_ypPDl7v/view?usp=drive_web a4 ct 1 backflip.csv https://drive.google.com/file/d/1XmKMiGIqjWj1FuGP1l3uvr7tJxJ3aTpD/view?usp=drive_web A4 int short.csv https://drive.google.com/file/d/1rG3J1J9OxCN7r4fayJMQ62MLHnviTZzB/view?usp=drive_web A9 ct1 short.csv https://drive.google.com/file/d/1QuVtPN4mz48v5nnsapGemiwQsLsIL5J5/view?usp=drive_web A9 ct2 short.csv https://drive.google.com/file/d/18Os0ABB4bqGZ9ODcK-x9EdxEbPzlU-M-/view?usp=drive_web A9 int short.csv https://drive.google.com/file/d/1_Ocotu5kpqulbrBO7zGV5W-ruUDC3GCl/view?usp=drive_web

Le mer. 12 avr. 2023 à 10:37, Davide @.***> a écrit :

Hello Emeline,

I do not know why this is not working for you, but this is how the function works.

The input is a list of dataframes (the outputs from openface).

By using read_faces you should be able to import the list in the right format.

Tidyface calls in the background a function called merge_faces, which is where you are having troubles with. Merge faces creates a variable called ID by using the names of the elements of the list.

For so.e reason this is failing in your case. As I cannot access to your datasets I do not know why this is not happening. My guess is that you did not save the test_faces dataframe in the correct list format. Could that be the case? For being more accurate in my assessment i should have a look at your data. We can arrange a screenshare session if you want.

Best Regards, Davide


From: ukiera @.> Sent: 11 April 2023 19:43 To: davidecannatanuig/openFaceR @.> Cc: CANNATA, DAVIDE @.>; Comment @.> Subject: Re: [davidecannatanuig/openFaceR] Error in merge_face (i think) (Issue #6)

EXTERNAL EMAIL: This email originated outside the University of Galway. Do not open attachments or click on links unless you believe the content is safe. RÍOMHPHOST SEACHTRACH: Níor tháinig an ríomhphost seo ó Ollscoil na Gaillimhe. Ná hoscail ceangaltáin agus ná cliceáil ar naisc mura gcreideann tú go bhfuil an t-ábhar sábháilte.

Hello !

The study just started so I can't say a lot about it but publications are expected in a few months hopefully !

Actually I imported 3 videos of the same subject, in 3 different conditions. I didn't see where I could create ID which is, indeed, what I was expecting to be the source of the error. The datasets come straight out of OpenFace and I didn't change anything to them. Could you tell me how I'm supposed to create the ID ?

Thank you,

Emeline

— Reply to this email directly, view it on GitHub< https://github.com/davidecannatanuig/openFaceR/issues/6#issuecomment-1503904815>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AQNUTLQJIPLW5B63F54OFGLXAWQ6DANCNFSM6AAAAAAWVDDU2A

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/davidecannatanuig/openFaceR/issues/6#issuecomment-1504884490, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYR3EIP3ETINYMNLMIEM5ITXAZSV3ANCNFSM6AAAAAAWVDDU2A . You are receiving this because you authored the thread.Message ID: @.***>