void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Net)) { LogError("owner is not initialized. Add Action \"newNet\"."); return; } OpenCVForUnity.DnnModule.Net wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Net, OpenCVForUnity.DnnModule.Net>(owner); List <OpenCVForUnity.CoreModule.MatOfInt> wrapped_netInputShapes = new List <OpenCVForUnity.CoreModule.MatOfInt>(); OpenCVForUnityPlayMakerActionsUtils.ConvertFsmArrayToList <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(netInputShapes, wrapped_netInputShapes); storeResult.Value = (int)wrapped_owner.getFLOPS(layerId.Value, wrapped_netInputShapes); OpenCVForUnityPlayMakerActionsUtils.ConvertListToFsmArray <OpenCVForUnity.CoreModule.MatOfInt, OpenCVForUnityPlayMakerActions.MatOfInt>(wrapped_netInputShapes, netInputShapes); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Net)) { LogError("owner is not initialized. Add Action \"newNet\"."); return; } OpenCVForUnity.DnnModule.Net wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Net, OpenCVForUnity.DnnModule.Net>(owner); if (!(netInputShape.Value is OpenCVForUnityPlayMakerActions.MatOfInt)) { LogError("netInputShape is not initialized. Add Action \"newMatOfInt\"."); return; } OpenCVForUnity.CoreModule.MatOfInt wrapped_netInputShape = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.MatOfInt, OpenCVForUnity.CoreModule.MatOfInt>(netInputShape); storeResult.Value = (int)wrapped_owner.getFLOPS(wrapped_netInputShape); }