jetpacapp / DeepBeliefSDK

The SDK for Jetpac's iOS Deep Belief image recognition framework
Other
2.86k stars 437 forks source link

Android app crash when call jpcnn_predict #10

Open ziggyJ opened 10 years ago

ziggyJ commented 10 years ago

I just slightly modify the AndroidExample to load the predictor after init the network and when I call predictionsValue = JPCNNLibrary.INSTANCE.jpcnn_predict(myPredictor, predictionsValuesPointer, predictionsNamesLength);

the app just crashed and there was a error message in the logcat log "07-17 12:05:08.367 29209-29209/com.example.cam A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 29209 (com.example.cam)"

I am not sure if it is a bug of DeepBelief android library or I did not use the library correctly?

Thanks,

Jason

petewarden commented 10 years ago

Sorry you're hitting problems Jason! Do you have a project you can share with me? I'll be happy to dig in further if I can reproduce the bug.

ziggyJ commented 10 years ago

I push my test project to https://github.com/ziggyJ/DeepBeliefAndroidPredictorExample It is based on the DeepBelief AndroidExample and modify a few lines and use some predictors produced from the iOS app. We successfully use those predictors in iOS app to recognise our custom objects, but the Android app crashed.

We tested on Galaxy S4 and Galaxy S3. The app crashed on both.

ziggyJ commented 10 years ago

Hi Petewarden,

I fixed this issue by modifying the source code of the jpcnn native library source code. It is because setlocale in android always returns NULL.

The commit is here. https://github.com/ziggyJ/DeepBeliefSDK/commit/ac567941a18369cd7b361d47affb1a372f29e97d

Regards,

Jason