DBraun / TD-FaceCHOP

Face landmark detection with DLib (in TouchDesigner)
Other
94 stars 10 forks source link

Can't load landmarks file from path with special characters #4

Open tohox opened 3 years ago

tohox commented 3 years ago

Every time my TOE loads the FaceCHOP chop generates this error:

Error: Error while loading face landmarks file. (/project1/face_chop/Facechop1) Message: Start compiling DAT: /project1/face_chop/delayed_trigger/timer1_callbacks (/project1/face_chop/delayed_trigger/timer1_callbacks) Message: End compiling DAT: /project1/face_chop/delayed_trigger/timer1_callbacks (/project1/face_chop/delayed_trigger/timer1_callbacks) Message: Start compiling DAT: /local/maps/replicator1_callbacks (/local/maps/replicator1_callbacks) Message: End compiling DAT: /local/maps/replicator1_callbacks (/local/maps/replicator1_callbacks) Error: Initializing... (/project1/face_chop/videodevin1)

The original FaceCHOP.toe worked fine from its original directory. I started by modifying it in place which also worked fine but when I renamed it and moved it to a new directory it started generating this error.

I copied the Plugins directory over to the new directory with both TD-FaceCHOP.dll and opencv_world411.dll in it. I also placed a copy of shape_predictor_68_face_landmarks.dat next to my new TOE and selected the new file location in the FaceCHOP's parameters and saved and restarted the TOE with the same result.

DBraun commented 3 years ago

It sounds like you've tested it correctly. I've tested your method on 2020.41040 but don't have an issue. What's your version? Could you try deleting the CHOP and re-creating it with the OP create dialog (the tab button interface or double-clicking the network editor)?

tohox commented 3 years ago

I'm using 2020.27390 at the moment. I tried deleting and recreating the FaceCHOP chop in my TOE but got the same result.

The project was nested pretty deep and a few of the subfolders had accented characters in their names. I copied the project directory closer to the root and removed all accented characters and this time the landmarks file load without any issues. I believe the problem could be related to the path length being too long or to the presence of accented characters or some kind of Unicode weirdness.

tohox commented 3 years ago

I can confirm that using accented characters in the directory path prevents the landmarks file from loading.

DBraun commented 3 years ago

Ok thanks for finding that. I'll re-open the issue because this seems solvable, although not high priority.

tohox commented 3 years ago

Of course, sorry for being so hasty and thanks for the follow-up!