jetpacapp / DeepBeliefSDK

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

Can't open device file: /var/lib/jpcnn/char_dev and crashes on RPi/Raspbian #79

Open hallba opened 7 years ago

hallba commented 7 years ago

Related to #36 and #56

Using the pre built rpi binaries, the error described in #56 arises. However, fixing the "MAJOR_NUM" and recompiling using one of the below make commands creates a binary that crashes the rpi requiring a hard reset (i.e. Pulling the plug)

make TARGET=pi GEMM=eigen make TARGET=pi GEMM=piqpu make TARGET=pi GEMM=atlas

hallba commented 7 years ago

Some further testing with a model B suggests that the issue is the updates to the OS not the hardware. Modifying the make file to create a new target allows compilation with alternative libraries.

Testing pull request #74 gives a working binary but much slower than reported elsewhere (order of magnitude). Testing with the supplied images takes ~30 seconds using a pi zero (compiled using piqpu). This is comparable to using atlas or eigen so I believe that the QPU are not being used, though I'm not sure why. Compiling the related pi-gemm repo gives the expected speed up.

As a workaround, creating a symlink from /dev/vcio to /var/lib/jpcnn/char_dev allow some the compiled binaries to work on both the model B and the pi zero. This is much faster than my own attempted compilations but still twice as slow as the reported speed (ie 6 seconds rather than 3). Until the compilation issues are fixed this is a good solution