Test the program offline on non-training images before testing it online.
I suspect you have over-trained an over-fit net so that it essentially memorized the training images but is not able to generalize to non-training images.
How many input/target examples do you have? N = ?
What is the dimensionality of your input feature vectors? I = ?
[ I N ] = size(input)
What is the dimensionality of your output/target classification vectors? O = ?
[ O N ] = size(target)
Since you have c = 12 categories, O = c = 12 with target matrix columns equal to c-dimensional unit vectors with the row index of the 1 indicating the true class index of the corresponding input vector.
What are the sizes of the train/val/test sets? Ntrn/Nval/Ntst = ?
How many hidden-layer nodes? H = ?
What is the ratio of training equations Ntrneq = Ntrn*O to unknown weights Nw = (I+1)*H+(H+1)*O ?