Neural Networks

The place to share and discuss your Ultibo projects.
Gavinmc42
Posts: 1555
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Neural Networks

Postby Gavinmc42 » Sat Jan 20, 2018 1:20 pm

Been going though the Laz/fpc forum, playing catchup to this Free Pascal stuff .
Found an interesting post
http://forum.lazarus.freepascal.org/ind ... #msg266776

Made a new project, added "uses uconvolutionneuralnetwork", found the missing UBit file and it compiled :o
This Free Pascal stuff is so clean, in any other language a missing dependency would have crashed it.

Had been looking for some Pascal NN code, this one is recent ;)
Lots of assembler in the uvolume that will need fixing, converting Intel floating point to ARM/VC4:(
asm - vmov etc looks like it could be SIMD/NEON converted.
Since most NN stuff needs to be highly optimized asm this would be a good place to start.

Nearly no idea how to use it. Yet.
Perhaps get it running on this Intel box first?
cpuid reports " AVX: advanced vector extensions = false"
Think I might need something better than a Celeron Duo :(

uvolume -

Code: Select all

{$DEFINE AVX32}   

Add extra defines and code for ARM6_SIMD, ARM7_NEON, ARM8_NEON.
Perhaps Intel SSE assembler?

The OpenCL stuff could be of use since that mostly works on the QPU's now.
RPF says 64bit NEON should be faster than QPU's, why not use both :D

Neural network can still work with 8 bit integers, so maybe one day even faster?

Anyway, an interesting way to start NNing in Ultibo on Pi's.
Wonder if Joao Paulo Schwarz Schuler has a Pi?
Gavinmc42
Posts: 1555
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Neural Networks

Postby Gavinmc42 » Tue Apr 16, 2019 7:52 am

There is a Pascal port of this C Neural network
https://github.com/glouw/tinn
Useful links too.

Small enough I might be able to figure it out ;)
https://sourceforge.net/projects/pastinn/

No dependencies?
Years ago I came across a character recog system that used a optical mouse as the camera sensor.
But Ultibo Pi camera now works and does colour ;)

Train it to sort coloured Lego?
Been wondering when someone would do this.
https://www.seeedstudio.com/Kittenbot-L ... -2950.html
Lego bots? Will one set make a Lego picking up robot?

Autonomous PiLego combat bots ;)
User avatar
Ultibo
Site Admin
Posts: 2185
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: Neural Networks

Postby Ultibo » Thu Apr 18, 2019 12:25 am

Gavinmc42 wrote:There is a Pascal port of this C Neural network
https://github.com/glouw/tinn
Useful links too.

Small enough I might be able to figure it out ;)
https://sourceforge.net/projects/pastinn/

No dependencies?

At a quick look it appears there are no dependencies at all and it uses stock standard Pascal code, it should just about compile in Ultibo without changes.
Ultibo.org | Make something amazing
https://ultibo.org
Gavinmc42
Posts: 1555
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Neural Networks

Postby Gavinmc42 » Thu Apr 18, 2019 2:26 am

I have played with most of the big NN tools, Tensorflow, Torch, Leaf, Caffe....
Even Tensorflow Lite is still big.
I don't have a use case to devote the time to learning these tools.
This looks like it is small enough to learn and understand without taking up a lifetime to learn the tool like the big sets;)

A hobby version, simple enough to grasp and learn the basics of NN.
What I have been finding with Ultibo, the simple examples do 90% of my requirements.
Reducing the requirements helps too :lol:

Doing basic stuff with Ultibo teaches the basics and there is so much I want to learn.
And so much I dreamed about doing 40 years ago is now within reach.
Not only in a professional way but as hobbyist.

Easter break fun time ;)

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest