Go to Post I think that one of the most fantastic parts about FIRST is that the biggest and most successful teams are also the most abiding to the rules. - Matt Adams [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-13-2018, 07:15 PM
AirplaneWins AirplaneWins is offline
Registered User
FRC #2848
Team Role: Alumni
 
Join Date: Apr 2015
Rookie Year: 2015
Location: Dallas
Posts: 162
AirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond repute
No more pesky HSV tuning, just use machine learning

With the rise of various machine learning algorithms, I have enjoyed trying to find any way to implement the, in FRC. One simple use case was vision. No more dealing with retuning at every event. I trained a simple SSD for 20 minutes on my way home from school and got some acceptable results.

https://drive.google.com/open?id=0Bx...nBWQmhlNjFWeWs

here are some output images.

I'll let it run overnight and see how my results improve.
__________________

Last edited by AirplaneWins : 02-13-2018 at 07:16 PM. Reason: Spelling mistake
Reply With Quote
  #2   Spotlight this post!  
Unread 02-13-2018, 08:10 PM
chuteDoor's Avatar
chuteDoor chuteDoor is offline
Yes, chute door
AKA: Avi
FRC #1619 (Up a Creek Robotics)
Team Role: Tactician
 
Join Date: Apr 2015
Rookie Year: 2015
Location: Longmont, CO
Posts: 21
chuteDoor is a splendid one to beholdchuteDoor is a splendid one to beholdchuteDoor is a splendid one to beholdchuteDoor is a splendid one to beholdchuteDoor is a splendid one to beholdchuteDoor is a splendid one to beholdchuteDoor is a splendid one to behold
Re: No more pesky HSV tuning, just use machine learning

How many frames did you have to annotate for this degree of accuracy?

Looking forward to seeing what it comes up with after a night of training!
Reply With Quote
  #3   Spotlight this post!  
Unread 02-13-2018, 08:15 PM
AirplaneWins AirplaneWins is offline
Registered User
FRC #2848
Team Role: Alumni
 
Join Date: Apr 2015
Rookie Year: 2015
Location: Dallas
Posts: 162
AirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond repute
Re: No more pesky HSV tuning, just use machine learning

Quote:
Originally Posted by chuteDoor View Post
How many frames did you have to annotate for this degree of accuracy?

Looking forward to seeing what it comes up with after a night of training!
For this test, I only used 20 frames because I needed something quick and I was too lazy to annotate more than that at the time. However, for future tests, I am doing 500. I plan on implementing this method to make life easier http://www.tmrfindia.org/ijcsa/v11i23.pdf.
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 02-17-2018, 02:03 PM
jhud jhud is offline
Registered User
FRC #0449
 
Join Date: Feb 2018
Location: Maryland
Posts: 5
jhud is an unknown quantity at this point
Re: No more pesky HSV tuning, just use machine learning

Can you tell me what network you used? We tried using DetectNet, but it doesn't seem to work for small data sets.
Reply With Quote
  #5   Spotlight this post!  
Unread 02-17-2018, 02:21 PM
Loveless Loveless is offline
Registered User
no team
Team Role: Engineer
 
Join Date: Mar 2017
Rookie Year: 2011
Location: St Louis
Posts: 57
Loveless has a spectacular aura aboutLoveless has a spectacular aura about
Re: No more pesky HSV tuning, just use machine learning

Quote:
Originally Posted by jhud View Post
Can you tell me what network you used? We tried using DetectNet, but it doesn't seem to work for small data sets.
DetectNet's guts is googlenet, which was designed for ilsvrc, an annual computer vision challenge that was a 1000 classes and over a million images. I would be very skeptical about using it for 2 reasons. Firstly, it is extremely likely that you would be overfitting your model, which causes unexpected behavior on images not in the training set. Secondly, inference time. Googlenet is very large (though it uses x12 less parameters than alexnet). inference times matter when you have a clock running.
Reply With Quote
  #6   Spotlight this post!  
Unread 02-17-2018, 02:32 PM
jhud jhud is offline
Registered User
FRC #0449
 
Join Date: Feb 2018
Location: Maryland
Posts: 5
jhud is an unknown quantity at this point
Re: No more pesky HSV tuning, just use machine learning

Yeah, we did run into those problems and we realize DetectNet is not suitable for our needs. Do you know a good alternative? Thanks!
Reply With Quote
  #7   Spotlight this post!  
Unread 02-17-2018, 03:02 PM
Loveless Loveless is offline
Registered User
no team
Team Role: Engineer
 
Join Date: Mar 2017
Rookie Year: 2011
Location: St Louis
Posts: 57
Loveless has a spectacular aura aboutLoveless has a spectacular aura about
Re: No more pesky HSV tuning, just use machine learning

What is your ultimate end goal?

Yellow is a pretty distinct color on an frc field. I would look into otsu thresholding.
Reply With Quote
  #8   Spotlight this post!  
Unread 02-17-2018, 03:14 PM
jhud jhud is offline
Registered User
FRC #0449
 
Join Date: Feb 2018
Location: Maryland
Posts: 5
jhud is an unknown quantity at this point
Re: No more pesky HSV tuning, just use machine learning

Our goal is to get output just like how it looks in the drive folder @AirplaneWins linked at the top of this thread. Our team tried methods other than machine learning, but they didn't work; ML was our last resort.
Reply With Quote
  #9   Spotlight this post!  
Unread 02-17-2018, 03:32 PM
Loveless Loveless is offline
Registered User
no team
Team Role: Engineer
 
Join Date: Mar 2017
Rookie Year: 2011
Location: St Louis
Posts: 57
Loveless has a spectacular aura aboutLoveless has a spectacular aura about
Re: No more pesky HSV tuning, just use machine learning

There comes a moment in every frc student's life where they are torn between exploring their technical creativity and strictly pursuing blue banners. The two are more often than not mutually exclusive. (That isn't meant to deter you in the slightest, mind you)

While object detection is not a new concept, it has been revitalized thanks to things such as YOLO and r-cnn a few years ago. Time permitting, it would make the most sense to start from the foundations, and build up (not unlike how math is taught), but considering bag and tag encroaching on us, that might not be what you want to do.

In the spirit of modern machine learning ("there are no free lunches"): here is a collection of papers that would be worth reading. Do not let the fact that these are professional publications deter you.

AirplaneWins said he uses "a simple SSD". The original paper is number 7 on the list I linked. With a rudimentary google search, you can find many open source implementations across various deep learning frameworks of your run of the mill single shot detector (SSD).
Reply With Quote
  #10   Spotlight this post!  
Unread 02-17-2018, 06:40 PM
AirplaneWins AirplaneWins is offline
Registered User
FRC #2848
Team Role: Alumni
 
Join Date: Apr 2015
Rookie Year: 2015
Location: Dallas
Posts: 162
AirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond repute
Re: No more pesky HSV tuning, just use machine learning

Quote:
Originally Posted by jhud View Post
Yeah, we did run into those problems and we realize DetectNet is not suitable for our needs. Do you know a good alternative? Thanks!
Just as Loveless said, there are tons of models you can try. After some more experimenting, I moved to an implementation of Yolo9000 as I'm trying to get as close to real-time as possible. I've had great success with it so far and really like the model. I did some custom changes to its architecture though, to make it easier to run on the rio/phone.I've attache the paper I've based it on.

https://arxiv.org/abs/1612.08242
__________________
Reply With Quote
  #11   Spotlight this post!  
Unread 02-18-2018, 12:07 PM
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,629
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: No more pesky HSV tuning, just use machine learning

I am definitely keeping an eye on this conversation!
__________________
CalGames 2009 Autonomous Champion Award
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC).
Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
2017 Utah Regional Winner!, Sacramento Finalist
Innovation in Control Newton/Carver Divisions , Newton #5 Captain
2018 WFFA Sacramento, Creativity Award Galileo-Robling Divisions
Reply With Quote
  #12   Spotlight this post!  
Unread 02-18-2018, 03:28 PM
Loveless Loveless is offline
Registered User
no team
Team Role: Engineer
 
Join Date: Mar 2017
Rookie Year: 2011
Location: St Louis
Posts: 57
Loveless has a spectacular aura aboutLoveless has a spectacular aura about
Re: No more pesky HSV tuning, just use machine learning

A very big advantage that yolo9000 has is its hierarchical classification, thanks to some older concepts in natural language processing finally moving over to computer vision, as the paper you linked described. It is a excellent paper that is really pushing the field forward.

How many images are you training on? I would think about ten thousand or so would suffice depending on how you modified the model (and of course an at least equal amount of "other" images).
Reply With Quote
  #13   Spotlight this post!  
Unread 02-18-2018, 03:50 PM
AirplaneWins AirplaneWins is offline
Registered User
FRC #2848
Team Role: Alumni
 
Join Date: Apr 2015
Rookie Year: 2015
Location: Dallas
Posts: 162
AirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond repute
Re: No more pesky HSV tuning, just use machine learning

Quote:
Originally Posted by Loveless View Post
A very big advantage that yolo9000 has is its hierarchical classification, thanks to some older concepts in natural language processing finally moving over to computer vision, as the paper you linked described. It is a excellent paper that is really pushing the field forward.

How many images are you training on? I would think about ten thousand or so would suffice depending on how you modified the model (and of course an at least equal amount of "other" images).

Right now I have amassed about 11,000 images. Right now having issues with image size, and am having to resize a lot of them to have a bigger batch size.
__________________
Reply With Quote
  #14   Spotlight this post!  
Unread 02-20-2018, 03:17 PM
AirplaneWins AirplaneWins is offline
Registered User
FRC #2848
Team Role: Alumni
 
Join Date: Apr 2015
Rookie Year: 2015
Location: Dallas
Posts: 162
AirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond reputeAirplaneWins has a reputation beyond repute
Re: No more pesky HSV tuning, just use machine learning

Quote:
Originally Posted by jhud View Post
Yeah, we did run into those problems and we realize DetectNet is not suitable for our needs. Do you know a good alternative? Thanks!
I would also look into an R-CNN. They might be a bit slower but the accuracy tradeoff is worth it imo.
__________________
Reply With Quote
  #15   Spotlight this post!  
Unread 02-20-2018, 03:23 PM
jhud jhud is offline
Registered User
FRC #0449
 
Join Date: Feb 2018
Location: Maryland
Posts: 5
jhud is an unknown quantity at this point
Re: No more pesky HSV tuning, just use machine learning

What I'm really curious about is how you (AirplaneWins) got a dataset of 20 images to work. We'd really like to know since getting 10,000 annotated images is not really feasible for us. Did you use Yolo9000 for those 20 images, or something else? What was the very first thing you did to get the output you linked on GDrive? Thanks!
Reply With Quote
Reply


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 10:22 PM.

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


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