Convert model to binary

The final step is to use the OpenMV NN converter script to convert the model into a binary format, runnable by the OpenMV Cam. The converter script outputs a code for each layer type, followed by the layer's dimensions and weights (if any).

On the OpenMV Cam, the firmware reads the binary file and builds the network in memory using a linked list data structure.

Running this command generates the binary model:

python2 repos/openmv/ml/cmsisnn/nn_convert.py --model repos/openmv/ml/cmsisnn/models/smile/smile.pk1 --mean /home/embedded/repos/openmv/ml/cmsisnn/models/smile/smile_database/mean.binaryproto --output repos/openmv/ml/cmsisnn/models/smile/smile.network
Previous Next