Thursday, February 8, 2007

BlogDay 28: Miranda Version 0.2

Finally added a pretty much working model of neural networks onto the code...
The ml libraries are really a boon...they are pretty much optimized and efficient. I was amazed by the the accuracy of predictions.... More abt it later...

I send the whole of yesterday optimizing our code... it runs much faster now...

Tuesday, February 6, 2007

BlogDay 26: CvANN_MLP::train

<update>
If you are looking for sample code for CvANN_MLP, see this
</update>

The Pro work is going on... i was a bit lazy abt filling up the blog...

We decided to try out a small vehicle rather than a full sized automobile. Reasons: Mechanical difficulties, Financial difficulties.


Has been trying out quite a number of stuffs. Interestingly, i'm back to square one in one thing.... ai for the vehicle. Has been exploring a lot of machine learning stuff in openCV... unfortunately most of them are either too complex or pretty much useless for our purpose...
And then i found neural networks in the machine learning libraries....

The difficult part was the implementation. All the documentation stuff were there but that was not enough for making a working example of ANN. Despite a lot of unsuccessful tries , i actually coded a pretty much working artificial network model in OpenCV/ML.

The code is for a simple purpose : Predict the average of two numbers. Its given 15 samples and then asked to find the average of 25 and 35. Here is a run:

Creating matrices..
12.000000 22.000000
56.000000 22.000000
34.000000 18.000000
26.000000 80.000000
23.000000 55.000000
34.000000 56.000000
22.000000 18.000000
26.000000 80.000000
23.000000 78.000000
20.000000 30.000000
45.000000 40.000000
33.000000 35.000000
39.000000 48.000000
27.000000 35.000000
28.000000 42.000000
12.000000 22.000000 17.000000
56.000000 22.000000 39.000000
34.000000 18.000000 26.000000
26.000000 80.000000 53.000000
23.000000 55.000000 39.000000
34.000000 56.000000 45.000000
22.000000 18.000000 20.000000
26.000000 80.000000 53.000000
23.000000 78.000000 50.500000
20.000000 30.000000 25.000000
45.000000 40.000000 42.500000
33.000000 35.000000 34.000000
39.000000 48.000000 43.500000
27.000000 35.000000 31.000000
28.000000 42.000000 35.000000
30.694805 0.000000

As u can see the prediction is 30.69.. yipee!!

I'm excited... But what abt the real thing....?? will it work on a much bigger scale... with all the unpredictable
things the image processing thing is to give the neural layer... well, lets hope it does..