Go to Post I've now read Dolly Parton's entire wikipedia page, which was not something I expected to do - WinterPoet [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-07-2014, 03:40
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Computer Vision without Image Processing

Say I have a gray scale image, 640x480 pixels, like this image: I am thinking about training a neural network, with the input of each pixel, to calculate distance. In my training data, I would load in thousands of images with corresponding distances.. I think this would be really cool way of doing computer vision to find the distance to a target. The question arises as to how quick it is and computational heavy it will be. Thoughts?
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."
  #2   Spotlight this post!  
Unread 17-07-2014, 05:35
SoftwareBug2.0's Avatar
SoftwareBug2.0 SoftwareBug2.0 is offline
Registered User
AKA: Eric
FRC #1425 (Error Code Xero)
Team Role: Mentor
 
Join Date: Aug 2004
Rookie Year: 2004
Location: Tigard, Oregon
Posts: 486
SoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant future
Re: Computer Vision without Image Processing

Quote:
Originally Posted by faust1706 View Post
Say I have a gray scale image, 640x480 pixels, like this image: I am thinking about training a neural network, with the input of each pixel, to calculate distance. In my training data, I would load in thousands of images with corresponding distances.. I think this would be really cool way of doing computer vision to find the distance to a target. The question arises as to how quick it is and computational heavy it will be. Thoughts?
The first thing that I think of if you're just throwing whole images in is: http://en.wikipedia.org/wiki/Curse_of_dimensionality
  #3   Spotlight this post!  
Unread 17-07-2014, 21:46
StevenB StevenB is offline
is having FRC withdrawal symptoms.
AKA: Steven Bell
no team
Team Role: College Student
 
Join Date: May 2005
Rookie Year: 2005
Location: Stanford, CA
Posts: 413
StevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond repute
Re: Computer Vision without Image Processing

What is the topology you hope to use for your network? Once you know that, you can pretty easily calculate the number of operations (mostly just multiplies and adds) and get a rough performance estimate.
__________________
Need a physics refresher? Want to know if that motor is big enough for your arm? A FIRST Encounter with Physics

2005-2007: Student | Team #1519, Mechanical Mayhem | Milford, NH
2008-2011: Mentor | Team #2359, RoboLobos | Edmond, OK
2014-??: Mentor | Looking for a team...
  #4   Spotlight this post!  
Unread 17-07-2014, 21:59
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: Computer Vision without Image Processing

Quote:
Originally Posted by faust1706 View Post
The question arises as to how quick it is and computational heavy it will be. Thoughts?
You'd probably want to train the network with two outputs, a binary output that tells whether a target is visible and a real valued output to output the distance. Otherwise you're always going to get the network's best try even when it's looking at junk

There's a bit of a black art in picking the types of nodes to place in each layer of the network. I'd suggest checking out convolutional nets for the initial layers, unless you're going straight to deep learning.

If you're looking for a fun project to use to learn about NNs, then I can't encourage you enough (although you may want to start with some toy problems first). They are definitely a very cool computing paradigm. If you're considering this as a serious solution for FRC, though, I would offer the following caveats:

Regarding performance, a NN will never outperform a well-hand-coded algorithm in terms of speed, and will likely be several orders of magnitude slower. NNs have found wider usage lately because, like other types of machine learning, they're being used to implement algorithms that programmers have found it very difficult to discover on their own, but only in situations where data and compute power are highly available.

Collecting data manually is incredibly tedious. I assume that you were thinking of generating data using your existing hand-coded system. Realize, then, that your NN can't be any better (statistically) than your hand coded algorithm that it's being taught by.
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor

Last edited by RyanCahoon : 17-07-2014 at 22:03.
  #5   Spotlight this post!  
Unread 17-07-2014, 23:12
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: Computer Vision without Image Processing

It was just an idea I was playing around with. At our next meeting I'm going to collect lots of data and do a gradient descent algorithm with the inputs of image characteristics of the target, such as height and width in pixels, size, and center location. Hopefully I'll be able to write a script that is easy to feed in new data so all you'd have to do from year to year is threshold for the target, then feed in data to the script and then plug in values into the equation it pops out.
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."
  #6   Spotlight this post!  
Unread 18-07-2014, 01:37
sparkytwd's Avatar
sparkytwd sparkytwd is offline
Registered User
FRC #3574
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Seattle
Posts: 98
sparkytwd will become famous soon enough
Re: Computer Vision without Image Processing

It's a cool idea, but I suspect you won't have much luck. It looks like you were initially planning on inputting all the pixels, but the issue with that is you need a massive network and your output is sensitive to boundary conditions.

In your last post you've made the right first step in simplifying your inputs, but I feel at this point you've over simplified where a neural net won't really give you what you're looking for.

Have you thought about direct photogrammetric methods?
http://arch.ced.berkeley.edu/kap/dis...a-gopro3be-/p1
http://balloons.space.edu/habp/photogrametry/
  #7   Spotlight this post!  
Unread 18-07-2014, 17:15
sparkytwd's Avatar
sparkytwd sparkytwd is offline
Registered User
FRC #3574
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Seattle
Posts: 98
sparkytwd will become famous soon enough
Re: Computer Vision without Image Processing

I sent that late last night, and I just want to be clear I don't want to discourage playing around with anything that seems cool.

Neural networks were one of the things that got me excited about computer science a long time ago. If you want a really cool project to try with NN's, I highly recommend this one: http://www.codeproject.com/Articles/...ndwritten-Digi
  #8   Spotlight this post!  
Unread 18-07-2014, 21:21
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: Computer Vision without Image Processing

The Jetson TK1 from NVIDIA is probably optimal for this. They're already giving you the software, you just need to train it.
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
  #9   Spotlight this post!  
Unread 18-07-2014, 22:19
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: Computer Vision without Image Processing

Quote:
Originally Posted by adciv View Post
The Jetson TK1 from NVIDIA is probably optimal for this. They're already giving you the software, you just need to train it.
That looks like an impressive board. What do you mean by they are already giving the software?
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."
  #10   Spotlight this post!  
Unread 18-07-2014, 22:36
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: Computer Vision without Image Processing

Quote:
Originally Posted by sparkytwd View Post
I sent that late last night, and I just want to be clear I don't want to discourage playing around with anything that seems cool.

Neural networks were one of the things that got me excited about computer science a long time ago. If you want a really cool project to try with NN's, I highly recommend this one: http://www.codeproject.com/Articles/...ndwritten-Digi
I realize how slow it'd be. That would be a fun project to do, alas, college is starting up again soon and I do not think I'd have the time to do it before.

So, I'm sticking with regression for calculating distance

speaking of which, I just got a simple regression to work that has an r value of >.999 involving the relationship between how high a target in an image and how far away it is. The next step is to incorporate camera tilt data from a gyro on it.
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."

Last edited by faust1706 : 19-07-2014 at 00:26.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:07.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi