{"action":"created","issue":{"url":"https://api.github.com/repos/takuya-takeuchi/DlibDotNet/issues/45","repository_url":"https://api.github.com/repos/takuya-takeuchi/DlibDotNet","labels_url":"https://api.github.com/repos/takuya-takeuchi/DlibDotNet/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/takuya-takeuchi/DlibDotNet/issues/45/comments","events_url":"https://api.github.com/repos/takuya-takeuchi/DlibDotNet/issues/45/events","html_url":"https://github.com/takuya-takeuchi/DlibDotNet/issues/45","id":367511262,"node_id":"MDU6SXNzdWUzNjc1MTEyNjI=","number":45,"title":"SEHException in DnnMmodFaceDetection example","user":{"login":"edwinckc","id":2934985,"node_id":"MDQ6VXNlcjI5MzQ5ODU=","avatar_url":"https://avatars1.githubusercontent.com/u/2934985?v=4","gravatar_id":"","url":"https://api.github.com/users/edwinckc","html_url":"https://github.com/edwinckc","followers_url":"https://api.github.com/users/edwinckc/followers","following_url":"https://api.github.com/users/edwinckc/following{/other_user}","gists_url":"https://api.github.com/users/edwinckc/gists{/gist_id}","starred_url":"https://api.github.com/users/edwinckc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edwinckc/subscriptions","organizations_url":"https://api.github.com/users/edwinckc/orgs","repos_url":"https://api.github.com/users/edwinckc/repos","events_url":"https://api.github.com/users/edwinckc/events{/privacy}","received_events_url":"https://api.github.com/users/edwinckc/received_events","type":"User","site_admin":false},"labels":[{"id":694247572,"node_id":"MDU6TGFiZWw2OTQyNDc1NzI=","url":"https://api.github.com/repos/takuya-takeuchi/DlibDotNet/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":{"login":"takuya-takeuchi","id":6241854,"node_id":"MDQ6VXNlcjYyNDE4NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6241854?v=4","gravatar_id":"","url":"https://api.github.com/users/takuya-takeuchi","html_url":"https://github.com/takuya-takeuchi","followers_url":"https://api.github.com/users/takuya-takeuchi/followers","following_url":"https://api.github.com/users/takuya-takeuchi/following{/other_user}","gists_url":"https://api.github.com/users/takuya-takeuchi/gists{/gist_id}","starred_url":"https://api.github.com/users/takuya-takeuchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takuya-takeuchi/subscriptions","organizations_url":"https://api.github.com/users/takuya-takeuchi/orgs","repos_url":"https://api.github.com/users/takuya-takeuchi/repos","events_url":"https://api.github.com/users/takuya-takeuchi/events{/privacy}","received_events_url":"https://api.github.com/users/takuya-takeuchi/received_events","type":"User","site_admin":false},"assignees":[{"login":"takuya-takeuchi","id":6241854,"node_id":"MDQ6VXNlcjYyNDE4NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6241854?v=4","gravatar_id":"","url":"https://api.github.com/users/takuya-takeuchi","html_url":"https://github.com/takuya-takeuchi","followers_url":"https://api.github.com/users/takuya-takeuchi/followers","following_url":"https://api.github.com/users/takuya-takeuchi/following{/other_user}","gists_url":"https://api.github.com/users/takuya-takeuchi/gists{/gist_id}","starred_url":"https://api.github.com/users/takuya-takeuchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takuya-takeuchi/subscriptions","organizations_url":"https://api.github.com/users/takuya-takeuchi/orgs","repos_url":"https://api.github.com/users/takuya-takeuchi/repos","events_url":"https://api.github.com/users/takuya-takeuchi/events{/privacy}","received_events_url":"https://api.github.com/users/takuya-takeuchi/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-10-07T01:29:01Z","updated_at":"2018-10-07T10:10:38Z","closed_at":null,"author_association":"NONE","body":"# Summary of your issue\r\nHello again!\r\nI compiled the libraries for CUDA support, and was able to run the DnnFaceRecognition fine. Using the same libraries with DnnMmodFaceDetection however, I run into an SEHException (see output below). I think I'm not the only one, since in #26, another user (postacik) mentions getting an error at this line:\r\n`var ret = Native.loss_mmod_deserialize(str, networkType);`\r\n\r\nIt appears that when they got things working, they were using DnnFaceRecognition, but perhaps DnnMmodFaceDetection still had some problem?\r\n\r\nI came upon this issue because I was using the built-in face detection/alignment through FaceRecognitionDotNet.\r\n\r\n# Environment\r\n\r\nVS2017 (15.7.4)\r\nCMake 3.12.3\r\nDlibDotNet 19.15.0\r\nTried building CUDA libs with Dlib 19.8, 19.15, and 19.16 + CUDA 9.2.\r\nAlso tried Dlib 19.8 + CUDA 9.0.\r\nXPS15 laptop with GTX1050\r\n\r\n# What did you do when you faced the problem?\r\n\r\nI just tried to run the DnnFaceRecognition, DnnMmodFaceDetection, and DnnInception examples, with different combinations of CUDA/Dlib versions. Only the DnnMmodFaceDetection example kept failing.\r\n\r\n## Example code:\r\n\r\n```\r\ndotnet run --configuration Release mmod_human_face_detector.dat 2007_007763.jpg\r\n```\r\n\r\n## Output:\r\n\r\n```\r\nUnhandled Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception.\r\n   at DlibDotNet.Dnn.LossMmod.Native.loss_mmod_operator_matrixs(IntPtr obj, Int32 type, MatrixElementType element_type, IntPtr matrixs, Int32 templateRows, Int32 templateColumns, UInt64 batchSize, IntPtr& ret)\r\n   at DlibDotNet.Dnn.LossMmod.Operator[T](IEnumerable`1 images, UInt64 batchSize) in C:\\Users\\edwin\\Desktop\\cuda test\\DlibDotNet-master\\src\\DlibDotNet\\Dnn\\LossMmod.cs:line 139\r\n   at DnnMmodFaceDetection.Program.Main(String[] args) in C:\\Users\\edwin\\Desktop\\cuda test\\DlibDotNet-master\\examples\\DnnMmodFaceDetection\\Program.cs:line 36\r\n```\r\n\r\n## What did you intend to be?\r\n\r\nProbably some detected faces (I'm guessing). Thanks for your time!"},"comment":{"url":"https://api.github.com/repos/takuya-takeuchi/DlibDotNet/issues/comments/427641239","html_url":"https://github.com/takuya-takeuchi/DlibDotNet/issues/45#issuecomment-427641239","issue_url":"https://api.github.com/repos/takuya-takeuchi/DlibDotNet/issues/45","id":427641239,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzY0MTIzOQ==","user":{"login":"takuya-takeuchi","id":6241854,"node_id":"MDQ6VXNlcjYyNDE4NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6241854?v=4","gravatar_id":"","url":"https://api.github.com/users/takuya-takeuchi","html_url":"https://github.com/takuya-takeuchi","followers_url":"https://api.github.com/users/takuya-takeuchi/followers","following_url":"https://api.github.com/users/takuya-takeuchi/following{/other_user}","gists_url":"https://api.github.com/users/takuya-takeuchi/gists{/gist_id}","starred_url":"https://api.github.com/users/takuya-takeuchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takuya-takeuchi/subscriptions","organizations_url":"https://api.github.com/users/takuya-takeuchi/orgs","repos_url":"https://api.github.com/users/takuya-takeuchi/repos","events_url":"https://api.github.com/users/takuya-takeuchi/events{/privacy}","received_events_url":"https://api.github.com/users/takuya-takeuchi/received_events","type":"User","site_admin":false},"created_at":"2018-10-07T10:10:38Z","updated_at":"2018-10-07T10:10:38Z","author_association":"OWNER","body":"I was not be able to reproduce issue but it could be similar with.\r\nI have 2 develop machines.\r\n\r\n## machine 1 (Main - GTX 1080)\r\n1. clone https://github.com/takuya-takeuchi/DlibDotNet/tree/19.15.0.20180916\r\n1. Build DlibDotNet.Native and DlibDotNet.Native.Dnn by using MSVC 2017 x64 and CUDA\r\n   * use cuDNN is v7.0 for CUDA 9.1 (Win10) but installed CUDA is 9.2\r\n1. Build DnnMmodFaceDetection and run. It works.\r\n1. The following CUDA drivers is installed\r\n````\r\nC:\\Users\\TAKUYA>set CUDA\r\nCUDA_PATH=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v9.2\r\nCUDA_PATH_V9_0=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v9.0\r\nCUDA_PATH_V9_1=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v9.1\r\nCUDA_PATH_V9_2=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v9.2\r\n````\r\n\r\n## machine 2 (Sub - GTX 550 Ti)\r\n1. Copy the DnnMmodFaceDetection contains built binaries from machine 1\r\n1. Run DnnMmodFaceDetection but It doesn't work.\r\n````\r\nD:\\Works\\OpenSource\\DlibDotNet\\19.15.0.20180916\\examples\\DnnMmodFaceDetection>dotnet run --configuration Release mmod_human_face_detector.dat 2007_007763.jpg\r\n\r\nUnhandled Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception.\r\n   at DlibDotNet.Dnn.LossMmod.Native.loss_mmod_deserialize(Byte[] fileName, Int32 type)\r\n   at DlibDotNet.Dnn.LossMmod.Deserialize(String path, Int32 networkType) in D:\\Works\\OpenSource\\DlibDotNet\\19.15.0.20180916\\src\\DlibDotNet\\Dnn\\LossMmod.cs:line 65\r\n   at DnnMmodFaceDetection.Program.Main(String[] args) in D:\\Works\\OpenSource\\DlibDotNet\\19.15.0.20180916\\examples\\DnnMmodFaceDetection\\Program.cs:line 56\r\n````\r\n1. The following CUDA drivers is installed\r\n````\r\nC:\\Users\\TAKUYA>set CUDA\r\nCUDA_PATH=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v9.0\r\nCUDA_PATH_V9_0=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v9.0\r\nCUDA_PATH_V9_1=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v9.1\r\n````\r\n\r\nThe current code may occur issue depends on CUDA and cuDNN environmental."}}
{"actor":{"display_login":"takuya-takeuchi"}}