Open pageauc opened 9 years ago
HI pageauc, could you tell me how to deal with be locked up when running the test on RPI 2 and needed to be hard booted? i do need your help,thanks!
The explanation of what I did is at the top of this issue. Basically copied certain files so python so would be from the compiled version. Here is a summary of the script I wrote
I created a new install.sh in ~/projects/DeepBeliefSDK/source per below
!/bin/sh
echo "Installing libjpcnn library files"
sudo cp libjpcnn.so /usr/lib/
sudo cp src/include/libjpcnn.h /usr/include/
echo "Done"
Then ran sudo ./install.sh.
Note hang only happened because I had a previous version of these files and had to update them per the commands above.
To resolve the original hang I had to unplug and replug the power on the RPI Claude ...
I have successfully compiled and run the new RPI 2 jpcnn but had a slight problem. As previously noted in issue 36, I had a problem with the original RPI code on a B2. Successfully Compiled jpcnn on RPI B2 using your B2 instructions but my B2 locked up when running the test and needed to be hard booted. After looking at the problem I determined that my previous RPI B+ install,sh had copied /usr/lib/libjpcnn;so and /usr/include/libjpcnn.h. I replaced these from new source files and all works fine now. I am looking forward to doing some testing with my robot. Since the GPU is not required for jpcnn then it should be easier to use camera in parallel. I have used multiprocessor on my robot opencv program and am hoping to put jpcnn in another thread to do object recognition. Thanks for your excellent work. Greatly Appreciated Claude ...
I created a new install.sh in ~/projects/DeepBeliefSDK/source per below
!/bin/sh
echo "Installing libjpcnn library files" cp libjpcnn.so /usr/lib/ cp src/include/libjpcnn.h /usr/include/ echo "Done"
Then ran sudo ./install.sh.
FYI I also Updated to the latest 4.0 kernel http://news.softpedia.com/news/raspberry-pi-s-default-firmware-updated-to-linux-kernel-4-0-485088.shtml updated firmware using commands sudo apt-get update sudo apt-get upgrade sudo rpi-update sudo reboot
sudo apt-get update sudo apt-get upgrade
RPI B2 is overclocked per /boot/config.txt entries below.
arm_freq=1000 sdram_freq=500 core_freq=500 over_voltage=2 gpu_mem=128
Here is the output from the test that took 4637 milliseconds
pi@dawn-robot ~/projects/DeepBeliefSDK/source $ ./jpcnn -i data/dog.jpg -n ../networks/jetpac.ntwk -t -m s -d
JPCNN Network with 28 layers Node ConvNode - conv1 - _kernelWidth=11, _kernelCount=96, _marginSize=0, _sampleStride=4, _kernels->_dims=(96, 363), _bias->_dims=(96, 1) Node ReluNode - conv1_neuron.1 - Node ReluNode - conv1_neuron - Node PoolNode - pool1 - _patchWidth=3, _stride=2, _mode=max Node NormalizeNode - rnorm1 - _windowSize=5, _k=1.000000, _alpha=0.000020, _beta=0.750000 Node GConvNode - conv2 - _kernelsCount = 256, _subnodes = Node ConvNode - conv2 - _kernelWidth=5, _kernelCount=128, _marginSize=2, _sampleStride=1, _kernels->_dims=(128, 1200), _bias->_dims=(128, 1) Node ConvNode - conv2 - _kernelWidth=5, _kernelCount=128, _marginSize=2, _sampleStride=1, _kernels->_dims=(128, 1200), _bias->_dims=(128, 1) Node ReluNode - conv2_neuron.1 - Node ReluNode - conv2_neuron - Node PoolNode - pool2 - _patchWidth=3, _stride=2, _mode=max Node NormalizeNode - rnorm2 - _windowSize=5, _k=1.000000, _alpha=0.000020, _beta=0.750000 Node ConvNode - conv3 - _kernelWidth=3, _kernelCount=384, _marginSize=1, _sampleStride=1, _kernels->_dims=(384, 2304), _bias->_dims=(384, 1) Node ReluNode - conv3_neuron.1 - Node ReluNode - conv3_neuron - Node GConvNode - conv4 - _kernelsCount = 384, _subnodes = Node ConvNode - conv4 - _kernelWidth=3, _kernelCount=192, _marginSize=1, _sampleStride=1, _kernels->_dims=(192, 1728), _bias->_dims=(192, 1) Node ConvNode - conv4 - _kernelWidth=3, _kernelCount=192, _marginSize=1, _sampleStride=1, _kernels->_dims=(192, 1728), _bias->_dims=(192, 1) Node ReluNode - conv4_neuron.1 - Node ReluNode - conv4_neuron - Node GConvNode - conv5 - _kernelsCount = 256, _subnodes = Node ConvNode - conv5 - _kernelWidth=3, _kernelCount=128, _marginSize=1, _sampleStride=1, _kernels->_dims=(128, 1728), _bias->_dims=(128, 1) Node ConvNode - conv5 - _kernelWidth=3, _kernelCount=128, _marginSize=1, _sampleStride=1, _kernels->_dims=(128, 1728), _bias->_dims=(128, 1) Node ReluNode - conv5_neuron.1 - Node ReluNode - conv5_neuron - Node PoolNode - pool5 - _patchWidth=3, _stride=2, _mode=max Node NeuronNode - fc6 - _outputsCount=4096, _useBias=1, _weights->_dims=(4096, 9216) Node ReluNode - fc6_neuron.1 - Node ReluNode - fc6_neuron - Node NeuronNode - fc7 - _outputsCount=4096, _useBias=1, _weights->_dims=(4096, 4096) Node ReluNode - fc7_neuron.1 - Node ReluNode - fc7_neuron - Node NeuronNode - fc8 - _outputsCount=999, _useBias=1, _weights->_dims=(999, 4096) Node MaxNode - probs -
0.015300 soccer ball 0.020866 standard poodle 0.169138 boxer 0.038989 corgi 0.213237 Staffordshire bullterrier 0.024005 greyhound 0.012390 English setter 0.013972 miniature poodle 0.016022 tennis ball 0.025065 dalmatian 0.394529 golden retriever Classification took 4637 milliseconds