United12 United12 - 1 year ago 126
Python Question

How do I use a trained Matlab Neural Network to Python for detection purpose

I have trained a Neural Network using a Matlab Neural Network Toolbox, particularly using the command nntool. The detection is basically for traffic sign and I have used a database of 90 traffic images(no-entry,no right and stop signs), each of 30 images of size 8*8 pixels of which no-entry signs are taken positive. My input is 64*90 and target as 1*90. Now, I need to use this neural network in Python for real-time recognition. What parameters do I need? I am completely new to neural networking.Here's the link to an image Here's my link to the weights

Answer Source

First you need to take the weights of your neural network. An example:

[x,t] = simplefit_dataset;
net = feedforwardnet(20);
net = train(net,x,t);
wb = getwb(net)

Then I also suggest that you read on ANN structure, this will help you understand how the output of a neural network is calculated, given the weights. Then you can adapt it to your own needs and using that calculate an output in Python.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download