-
Notifications
You must be signed in to change notification settings - Fork 8
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
Facial Expressivity NaN #134
Comments
Hi Josh, are you getting any kind of error messages or is the function not logging anything at all? Additionally I would ensure file paths are correct and can be opened fine using import cv2
# Check if the files can be opened
expression_cap = cv2.VideoCapture(filepath)
baseline_cap = cv2.VideoCapture(baseline_filepath)
if not expression_cap.isOpened():
print(f"Error: Cannot open video file {filepath}")
if not baseline_cap.isOpened():
print(f"Error: Cannot open video file {baseline_filepath}")
expression_cap.release()
baseline_cap.release() |
Hi George, I've used the following code to test file paths as well as if video quality allows for face detection
Everything seems to work well, however, I know have a new error which appears when using the facial expressivity function which did not occur the last time we spoke:
I'm not sure if this is a problem with tensorflow, as the same videos work fine when i use a face detection / file path check. |
Does this error occur when running the code you shared in your first message? or are you using a different script? Because from the error message one possible issue that comes up is that it looks like you set |
Amazing, thanks for picking that up now! It works and doesn't produce the NaN now. From running the code, the output comes out as so, in both in the PowerShell and excel spreadsheet:
I'm just wondering now, how can I see the rest of the values (such as such as lips/eyebrows mean or overall/lower/upper std)? Thanks! |
Hm I believe that's an issue with how you are printing/saving the resulting dataframes. Instead what you could do is save the files in csv format from Python. Something like that should do the trick: if isinstance(framewise_loc, pd.DataFrame):
framewise_loc.to_csv(r"C:\Users\jjsw972\OneDrive - The University of Newcastle\Desktop\Framewise_Location.csv", index=False)
if isinstance(framewise_disp, pd.DataFrame):
framewise_disp.to_csv(r"C:\Users\jjsw972\OneDrive - The University of Newcastle\Desktop\Framewise_Displacement.csv", index=False)
if isinstance(summary, pd.DataFrame):
summary.to_csv(r"C:\Users\jjsw972\OneDrive - The University of Newcastle\Desktop\Summary.csv", index=False) |
Amazing, that works great! Thanks for all your help! |
Hi,
I've been trying to run the facial expressivity function, but all values returned are NaN. I'm running the code through Miniconda.
This is the code that I've been using:
Any help is very much appreciated! Thanks
The text was updated successfully, but these errors were encountered: