Deploying a DIGITS / Caffe model

I’ve trained a model using DIGITS, and successfully deployed it using
./ network_snapshot.caffemodel deploy.prototxt image.jpg -l labels.txt -m mean.npy

However the deploy takes ages (around 3 seconds) to run, while from within DIGITS I can test the model on a single image and the response is pretty much instant (same machine).

Presumably my deployment is loading the network each time, while in digits it’s already loaded and ready to go.
I want to apply my trained model to a camera feed, classifying every frame (~30fps) or at least most of them. I probably just need to modify the python script running the deployment but could use a few pointers to get me started.


Just to add, the actual classification took 0.0883… seconds so it should be able to classify ~ 1 in 3 frames which is sufficient for my task

modify to read the image from the camera
then put a loop over of the read and classify sections… simple in the end

{ I understand this is a very old thread. }
Bumping it after finding no other options.

I have trained a model in digit.
It works perfectly as expected. But when deploying, using codes from or

I am not getting similar results as in digit itself.
Not just the value, but the classification itself is way off.

Any clues what could be going wrong? Or any example script to deploy the standard digit model?