tucan9389 / PoseEstimation-CoreML

The example project of inferencing Pose Estimation using Core ML
https://github.com/motlabs/awesome-ml-demos-with-ios
MIT License
680 stars 136 forks source link

I'm having trouble trying to test your code #16

Open PineLover opened 5 years ago

PineLover commented 5 years ago

hi i was searching for a pose estimation code for ios and i found that your demos were great

and i downloaded your code and doesn't work

here's what i've done

as you instructed i downloaded models and put them added cpm_model/model.mlmode as model_cpm.mlmodel and hourglass_model/model.mlmodel as model_hourglass.model

image

and image

even though i have errors i could run the simulator and i got

2019-07-09 15:36:26.736876+0900 PoseEstimation-CoreML[4719:560970] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
2019-07-09 15:36:27.116772+0900 PoseEstimation-CoreML[4719:560970] [espresso] [Espresso::handle_ex_] exception=Unsupported engine type
Error: no video devices available
2019-07-09 15:36:27.205463+0900 PoseEstimation-CoreML[4719:560970] *** Terminating app due to uncaught exception 'NSGenericException', reason: '*** -[AVCaptureSession startRunning] startRunning may not be called between calls to beginConfiguration and commitConfiguration'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000104cdb6fb __exceptionPreprocess + 331
    1   libobjc.A.dylib                     0x0000000103e44ac5 objc_exception_throw + 48
    2   AVFoundation                        0x00000001047b4bed -[AVCaptureSession startRunning] + 206
    3   PoseEstimation-CoreML               0x00000001034e886c $s21PoseEstimation_CoreML12VideoCaptureC5startyyF + 140
    4   PoseEstimation-CoreML               0x00000001034dbec7 $s21PoseEstimation_CoreML19JointViewControllerC14viewWillAppearyySbF + 391
    5   PoseEstimation-CoreML               0x00000001034dbf13 $s21PoseEstimation_CoreML19JointViewControllerC14viewWillAppearyySbFTo + 51
    6   UIKitCore                           0x000000010fde2437 -[UIViewController _setViewAppearState:isAnimating:] + 687
    7   UIKitCore                           0x000000010fde2ba2 -[UIViewController __viewWillAppear:] + 131
    8   UIKitCore                           0x000000010fd092fe -[UITabBarController viewWillAppear:] + 293
    9   UIKitCore                           0x000000010fde2437 -[UIViewController _setViewAppearState:isAnimating:] + 687
    10  UIKitCore                           0x000000010fde2ba2 -[UIViewController __viewWillAppear:] + 131
    11  UIKitCore                           0x000000010fde438d -[UIViewController viewWillMoveToWindow:] + 696
    12  UIKitCore                           0x0000000110895195 -[UIView(Hierarchy) _willMoveToWindow:withAncestorView:] + 656
    13  UIKitCore                           0x00000001108a6069 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 456
    14  UIKitCore                           0x0000000110414fbc -[UIWindow addRootViewControllerViewIfPossible] + 1027
    15  UIKitCore                           0x0000000110415327 -[UIWindow _setHidden:forced:] + 289
    16  UIKitCore                           0x0000000110427f86 -[UIWindow makeKeyAndVisible] + 42
    17  UIKitCore                           0x00000001103d7f1c -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4555
    18  UIKitCore                           0x00000001103dd0c6 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1617
    19  UIKitCore                           0x000000010fc226d6 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 904
    20  UIKitCore                           0x000000010fc2afce +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
    21  UIKitCore                           0x000000010fc222ec -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
    22  UIKitCore                           0x000000010fc22c48 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1091
    23  UIKitCore                           0x000000010fc20fba __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 782
    24  UIKitCore                           0x000000010fc20c71 -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433
    25  UIKitCore                           0x000000010fc259b6 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 576
    26  UIKitCore                           0x000000010fc26610 _performActionsWithDelayForTransitionContext + 100
    27  UIKitCore                           0x000000010fc2571d -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223
    28  UIKitCore                           0x000000010fc2a6d0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
    29  UIKitCore                           0x00000001103db9a8 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 514
    30  UIKitCore                           0x000000010ff92dfa -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
    31  FrontBoardServices                  0x000000010d43b125 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448
    32  FrontBoardServices                  0x000000010d444ed6 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 283
    33  FrontBoardServices                  0x000000010d444700 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53
    34  libdispatch.dylib                   0x0000000108910db5 _dispatch_client_callout + 8
    35  libdispatch.dylib                   0x00000001089142ba _dispatch_block_invoke_direct + 300
    36  FrontBoardServices                  0x000000010d476146 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
    37  FrontBoardServices                  0x000000010d475dfe -[FBSSerialQueue _performNext] + 451
    38  FrontBoardServices                  0x000000010d476393 -[FBSSerialQueue _performNextFromRunLoopSource] + 42
    39  CoreFoundation                      0x0000000104c42be1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    40  CoreFoundation                      0x0000000104c42463 __CFRunLoopDoSources0 + 243
    41  CoreFoundation                      0x0000000104c3cb1f __CFRunLoopRun + 1231
    42  CoreFoundation                      0x0000000104c3c302 CFRunLoopRunSpecific + 626
    43  GraphicsServices                    0x000000010ac262fe GSEventRunModal + 65
    44  UIKitCore                           0x00000001103deba2 UIApplicationMain + 140
    45  PoseEstimation-CoreML               0x00000001034fdf4b main + 75
    46  libdyld.dylib                       0x0000000108985541 start + 1
    47  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

can you help me how to launch your project ... thank you

tucan9389 commented 5 years ago

Did you try to remove ~/Library/Developer/Xcode/DerivedData folder and rebuild?