SRL Archive - Research & Development Lounge

Neural Networks to find/verify objects


rawsilk

2012-11-25 23:52:32

I have done quite a bit of work with neural networks (research at university level). I have also written a quick program in C using the FANN library that allows me to click on a bunch of related objects, take a screen shot of that image, and then cascade train a neural network to identify that object. I then can click on an arbitrary object and it will spit out a number between -1 and +1 with +1 being 100% identification.

The speed of a neural network after it has been trained goes like ~N for simple forward prop networks. This is very fast compared to many algorithms which have to "deform" some template and then search repeatedly.

I have it working quite well on find ores in RS. To simplify things I first get a TPA of similar colored objects and scan over these points with the NN. ~99% correct identification at this point. I bet with a little tinkering this could be used to identify more complicated objects/randoms/etc.

Maybe this would be a pointless addition? Let me know your ideas.

Daniel

2012-11-26 00:00:24

We are an open source community. All contributions are welcome :)

The idea is certainly there.

superuser

2012-11-26 01:52:05

I've been playing around with the same idea. I wrote extension to Simba, since pascal script is too slow for this. The only thing taking time is proper training of the network, but the results after that are quite good.

I've not used NN to identify objects, but to make the character act like a human instead.

xtrapsp

2012-11-26 04:51:32

From: superuser
I've been playing around with the same idea. I wrote extension to Simba, since pascal script is too slow for this. The only thing taking time is proper training of the network, but the results after that are quite good.

I've not used NN to identify objects, but to make the character act like a human instead.


use Lape ;)

superuser

2012-11-26 07:26:25

From: xtrapsp
use Lape ;)


Still too slow :) I'm using CUDA to do some RPROP training.

rawsilk

2012-11-26 23:34:11

From: superuser
Still too slow :) I'm using CUDA to do some RPROP training.


I'd be curious to know how you are doing with CUDA. There tends to be more nan and infs, the larger the problem size in training of NNs. CUDA still uses standard ieee methods for nan value handling as far as I know, so they are big problems. I attempted using opencl and had varying results. Very fast on small well posed problems. broke down for poorly posed pronlems. Want to give me a run down of how you're doing so far?

Also cuda would be impractical for most srl users so they wouldn't be able to train the networks on their own machine. Glad to see there's support for NNs.

superuser

2012-11-26 23:58:06

From: rawsilk
I'd be curious to know how you are doing with CUDA. There tends to be more nan and infs, the larger the problem size in training of NNs. CUDA still uses standard ieee methods for nan value handling as far as I know, so they are big problems. I attempted using opencl and had varying results. Very fast on small well posed problems. broke down for poorly posed pronlems. Want to give me a run down of how you're doing so far?

Also cuda would be impractical for most srl users so they wouldn't be able to train the networks on their own machine. Glad to see there's support for NNs.


True. However, if you keep in mind that in GPU e.g. inf + n => inf, nan + a => nan, 0 / 0 or inf / inf => nan etc, you can prevent those with some little overhead. Also things like grid size, regs per thread, comp. density and loop overheads are 'bad', but keep in mind that you’re starting with about 1tflops of performance so if you're still hitting like 50% efficiency, that’s still not too bad at all.

Not at least when comparing to cpu.

Also, there are other means to train NNs on CUDA, with better efficiency imho. Like genetic algorithm.