create account

Training a car for an autonomous race by codelikeamother

View this thread on: hive.blogpeakd.comecency.com
· @codelikeamother ·
$12.27
Training a car for an autonomous race
I was very lucky to take part in AWS re:Invent this year. It is a big conference by Amazon, organized in Las Vegas. Events like this serve a number of purposes, among which I could mention new products announcements, existing products and their applications, workshops for existing and new customers, getting feedback and requirements to look for new products, presenting third parties leveraging the possibilities of the existing stack (the more successful they are, the more likely an acquisition is), certifications - these are Amazons goals. In short: get amazed, get hooked, use our products to migrate onto our cloud, use our specialized products to depend on us in a not-easily-escapable way. 

![deepracer-logo.png](https://cdn.steemitimages.com/DQmNQKaWuqVMAPXppQWN7i8vJ1vFwfaBJVVppNDUh3t8S7M/deepracer-logo.png)

For people like me it was a chance to learn Amazon ways of doing things. I went to workshops, to presentations around DevOps, tried meeting some people from our company, from Poland, from other companies. I had some fun going to a party, spent a penny or two at a casino (just so that I don't have to explain why I went to Vegas and didn't try playing). I enjoyed the food and overall it was a time well spent.

![IMG_20181126_170413.jpg](https://cdn.steemitimages.com/DQma96cptGGejDrK9VvUtuNRTLwGupVVJBM2pTnLwNhngQT/IMG_20181126_170413.jpg)

Apart from extremely useful tools for business applications, Amazon usually presents a bit of awesome to encourage people to get involved. In 2017 it was [DeepLens](https://aws.amazon.com/deeplens/) - a computer with a camera, specialised to train for image recognition using machine learning solutions that AWS provides.

# Machine Learning

Can a computer learn like a human? Not really. Well, it does, but in a specific way which is a bit different from what we do as humans. Let's think about those primitive examples first: humans. One reads a book and remembers what applies to one's needs and expectations. Based on that conclusions are being made, piece of information is put into specific context, then it is being applied in some way as an evaluation, adjusted, repeated, mastered. What happens in the brain that makes that happen? How do neurons store that information, expand it and wire into what we know now? I don't know.
Machine learning usually has a much simplified way of taking the data in - there is some model, an exercise. There are some inputs and some outputs. A reward is being defined to guide whatever learning method we take, to decide what makes a better result than the previous one. Then some test data are being taken in tests repeated. Then we can verify decisions of built decision model and use what the computer has learned. 

Amazon introduced Deep Lens as a product that would provide a hands-on learning experience for engineers. Deep Lens can be used to apply trained AI models for image recognition and to combine them with AWS services to perform actions. It could do a number of things. There was for example a test whether an object is a hot dog. Deep Lens introduces developers into the world of deep learning - areas where algorithms are used to learn using unstructured data and it's the algorithm trying to work out which inputs matter the most for a given case and which output is the best reaction for it.

What purpose it serves is an excellent questions. A tool like that will spark curiosity. It will push people to try and make something with it. It will push them to use tools and solutions upon which the toy is built. Such developers will be amazed and will be more likely to work with AWS products in the future.

Imagine a computer that would read a book to you: https://aws.amazon.com/deeplens/community-projects/readtome/ - this is one of the examples how someone used a toy to combine some solutions into a working proof of concept.

# New products in 2018

New products are part of the show. Every day something new is presented to the public. Some announcements are big, some are small. Some are instantly available, others are work in progress and customers' input is welcome to help guide their development.

You may be aware that Amazon is heavily involved in artificial intelligence and machine learning. Solutions like that are quite heavily used when developing more human-like interfaces for the customers.

https://www.youtube.com/watch?v=d1CRGkDgrrQ

One of new products introduced in the area of machine learning was Reinforcement Learning - a method of deep learning where an already trained model builds on itself to receive even greater result. One defines a reward function and executes a repetitive studying cycle. Lastly the output model can either be evaluated or used for yet another training session. What is more interesting, a model trained for a specific behaviour can then be given a different reward function for next the studying cycles and in this way sophisticated AI behaviours can be created.

Another announcement was about [RoboMaker](https://aws.amazon.com/robomaker/) - a service that includes an environment for modelling, testing, training and evaluating physical devices in virtual space. Designing, building and verifying equipment is not an easy task. It's not cheap either. With a solution to simulate machines' behaviour more can be planned and tested. Breaking is just a change of state in the simulation. Running a thousand tests, each with slightly adjusted settings is now a matter of couple clicks. And there are more applications like using AWS services to do some of the computing for the robots or to manage a fleet of complete robots.

https://www.youtube.com/watch?v=U1ukEpzKCYY

# DeepRacer

As with Deep Lens, [DeepRacer](https://aws.amazon.com/deepracer/) has been introduced to provide fun and engaging way to learn how to use products provided by AWS. One gets a remote controlled car with a camera that can be controlled with a phone. While it's an impressive toy, what's even more impressive is that there is a computer connected to it and it has software to perform autonomous driving action. Yes, it's a self-driving car.

![IMG_20181129_142816.jpg](https://cdn.steemitimages.com/DQmTwEFfSGYmCnaKh7mXF1N9nk5qGTAK1f8J3rrQNF51p1k/IMG_20181129_142816.jpg)

Amazon provides reinforcement learning projects which can be used to teach the car. The project uses a virtual 3D model of a car and a track to train the model. Once done, model can be downloaded and copied onto the car which can be placed on a track for evaluation. Nice, isn't it?

To engage people even more, a DeepRacer League has been announced where one can submit their models and compete for the best place. Winners are invited to the finals which will take place at the next re:Invent.

# DeepRacer League

On the 8th of May AWS Summit is taking place in London and together with it a DeepRacer League event will take place. I would like to train a model and see a car with it complete a whole lap. This will be a very rewarding moment. I couldn't possibly imagine myself training a winning model with so many experienced engineers having their go.

This video from Amazon will show you much more about DeepRacer then I am able to.

https://www.youtube.com/watch?v=CKA2e63nXFo

# What for?

Why would one even consider doing anything like this? Why would a grown man take a toy and waste time playing with it?

I'm not a huge innovator, I don't see myself leading others towards the unknown apart from the case where I go in a wrong direction by accident and suddenly happen to find myself at something new. Leading is scary. It's like running away from others into a thick fog with loads of lamp posts to hit your head with. If you're lucky. If not, there's a cliff edge.

Why would I try things without a clear goal? I can start learning new things. Accidentally, I can solve a problem or two. I can land in a place completely different than where I am now. Remember that guy that made Read To Me with Deep Lens? Here he is:

https://www.youtube.com/watch?v=cC8A5VmEVtg

You never know when wasted time becomes a used opportunity.

Initially I didn't want to take part in all this, I thought that others deserve such car more and would put it to a better use. But then I thought: what if I actually could make it work and use it as a spark to ignite others' curiosity? What if I could use it to promote technology as a career path? We'll see how it works out.

# The plan

If you had a look at the video above, you could see a DeepRacer console provided by AWS. Unfortunately I do not have access to it since one needs to be granted rights to use it in the preview phase. I used for a while when I had a DeepRacer workshop account but that one got cut off. The nice thing about it is that it takes away the whole hassle of setting up instances of services in AWS and only exposes a reward function and a couple parameters for you to use.

This raises the bar, but it won't stop me. Amazon provides instructions on how to use [SageMaker](https://aws.amazon.com/sagemaker/) to train a model. I have also found a blog post that presents steps to start training a model starting with a RoboMaker demo. I already tried both and so far only succeeded with the RoboMaker one.

![Screenshot from 2019-04-25 19-25-33.png](https://cdn.steemitimages.com/DQmZo9pu88qHoVWudSvqJs1ipcMVHoCyJqv43Nftc4x1aYQ/Screenshot%20from%202019-04-25%2019-25-33.png)

What I am missing and need to focus on is bridging the gap between what I already understand and what I don't. I have some understanding of the concept that DeepRacer console is providing, but I don't yet understand all the bits that are engaged in the actual training. I followed some steps and got something trained, but I don't know what it really means apart from building a package with some code in it and letting a SageMaker instance churn through it to get some learning done.

From the video about the DeepRacer League I have learned that a workshop has been prepared to start working with DeepRacer. I will provide links in the resources section below.

# Resources
DeepRacer homepage: https://aws.amazon.com/deepracer/
DeepRacer FAQs: https://aws.amazon.com/deepracer/faqs/
DeepRacer Pricing: https://aws.amazon.com/deepracer/pricing/
DeepRacer Getting Started: https://aws.amazon.com/deepracer/getting-started/
DeepRacer League: https://aws.amazon.com/deepracer/league/

DeepRacer Forums: https://forums.aws.amazon.com/forum.jspa?forumID=318
DeepRacer Docs: https://docs.aws.amazon.com/deepracer/index.html
DeepRacer Workshops (from re:Invent and AWS Summits): https://github.com/aws-samples/aws-deepracer-workshops

DeepRacer presentation https://www.youtube.com/watch?v=0_rxa0ZqCDs
AWS DeepRacer training: https://www.aws.training/learningobject/wbc?id=32143

Instructions for setting up a SageMaker Notebook: https://docs.aws.amazon.com/deepracer/latest/developerguide/train-evaluate-models-using-sagemaker-notebook.html

Kloud Blog post on how to start a RoboMaker sample for DeepRacer: https://blog.kloud.com.au/2018/12/21/aws-deepracer-training-your-reinforcement-learning-model-in-aws-robomaker/
AWS GitHub repository for RoboMaker sample app: https://github.com/aws-robotics/aws-robomaker-sample-application-deepracer

AWS GitHub repository for SageMaker Reinforcement Learning example for DeepRacer: https://github.com/awslabs/amazon-sagemaker-examples/tree/master/reinforcement_learning/rl_deepracer_robomaker_coach_gazebo

AWS Machine Learning training path: https://aws.amazon.com/training/learning-paths/machine-learning/

*AWS DeepRacer logo has been obtained from the DeepRacer website: https://aws.amazon.com/deepracer/*


***
<center><sup>Originally posted on [Code Like A Mother](https://codelikeamother.uk/training-a-car-for-an-autonomous-race). Steem blog powered by [ENGRAVE](https://engrave.website).</sup></center>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 936 others
properties (23)
authorcodelikeamother
permlinktraining-a-car-for-an-autonomous-race
categoryprogramming
json_metadata{"tags":["programming","steemiteducation","technology","aws","ai"],"image":["https://cdn.steemitimages.com/DQmNQKaWuqVMAPXppQWN7i8vJ1vFwfaBJVVppNDUh3t8S7M/deepracer-logo.png","https://cdn.steemitimages.com/DQmNQKaWuqVMAPXppQWN7i8vJ1vFwfaBJVVppNDUh3t8S7M/deepracer-logo.png","https://cdn.steemitimages.com/DQma96cptGGejDrK9VvUtuNRTLwGupVVJBM2pTnLwNhngQT/IMG_20181126_170413.jpg","https://cdn.steemitimages.com/DQmTwEFfSGYmCnaKh7mXF1N9nk5qGTAK1f8J3rrQNF51p1k/IMG_20181129_142816.jpg","https://cdn.steemitimages.com/DQmZo9pu88qHoVWudSvqJs1ipcMVHoCyJqv43Nftc4x1aYQ/Screenshot%20from%202019-04-25%2019-25-33.png"],"links":["https://aws.amazon.com/deeplens/","https://aws.amazon.com/deeplens/community-projects/readtome","https://youtube.com/watch?v=d1CRGkDgrrQ","https://aws.amazon.com/robomaker/","https://youtube.com/watch?v=U1ukEpzKCYY","https://aws.amazon.com/deepracer/","https://youtube.com/watch?v=CKA2e63nXFo","https://youtube.com/watch?v=cC8A5VmEVtg","https://aws.amazon.com/sagemaker/","https://aws.amazon.com/deepracer","https://aws.amazon.com/deepracer/faqs","https://aws.amazon.com/deepracer/pricing","https://aws.amazon.com/deepracer/getting-started","https://aws.amazon.com/deepracer/league","https://forums.aws.amazon.com/forum.jspa?forumID=318","https://docs.aws.amazon.com/deepracer/index.html","https://github.com/aws-samples/aws-deepracer-workshops","https://youtube.com/watch?v=0_rxa0ZqCDs","https://www.aws.training/learningobject/wbc?id=32143","https://docs.aws.amazon.com/deepracer/latest/developerguide/train-evaluate-models-using-sagemaker-notebook.html","https://blog.kloud.com.au/2018/12/21/aws-deepracer-training-your-reinforcement-learning-model-in-aws-robomaker","https://github.com/aws-robotics/aws-robomaker-sample-application-deepracer","https://github.com/awslabs/amazon-sagemaker-examples/tree/master/reinforcement_learning/rl_deepracer_robomaker_coach_gazebo","https://aws.amazon.com/training/learning-paths/machine-learning","https://aws.amazon.com/deepracer/*"],"category":{"_id":"5ca0215af22d6d0019f5beb0","steem_tag":"programming","slug":"programming","name":"Programming"},"app":"engrave","format":"markdown","domain":"codelikeamother.uk"}
created2019-04-27 07:23:00
last_update2019-04-27 07:23:00
depth0
children7
last_payout2019-05-04 07:23:00
cashout_time1969-12-31 23:59:59
total_payout_value8.878 HBD
curator_payout_value3.391 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length11,946
author_reputation3,544,171,499,075
root_title"Training a car for an autonomous race"
beneficiaries
0.
accountengrave
weight1,500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id83,830,345
net_rshares27,196,424,625,796
author_curate_reward""
vote details (1000)
@arcange ·
Congratulations @codelikeamother!
Your post was mentioned in the [Steem Hit Parade for newcomers](/hit-parade/@arcange/daily-hit-parade-for-newcomers-20190427) in the following categories:

* Upvotes - Ranked 2 with 1224 upvotes
* Pending payout - Ranked 1 with $ 13,86

I also upvoted your post to increase its reward
If you like my work to promote newcomers and give them more visibility on the Steem blockchain, consider to [vote for my witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=arcange&approve=1)!
properties (22)
authorarcange
permlinkre-training-a-car-for-an-autonomous-race-20190427t181853000z
categoryprogramming
json_metadata""
created2019-04-28 16:19:18
last_update2019-04-28 16:19:18
depth1
children0
last_payout2019-05-05 16:19:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length530
author_reputation1,146,633,668,945,473
root_title"Training a car for an autonomous race"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id83,897,938
net_rshares0
@cubapl ·
when someone will again repeat the same bullshit that *autonomous cars* are the far future, I will show them your article about autonomous car races, which are **NOWADAYS**. big up @curie for promoting this interesting article and obviously good luck and a lot of coffes and donuts before !
👍  
properties (23)
authorcubapl
permlinkre-codelikeamother-training-a-car-for-an-autonomous-race-20190427t163737179z
categoryprogramming
json_metadata{"tags":["programming"],"users":["curie"],"app":"steemit/0.1"}
created2019-04-27 16:37:30
last_update2019-04-27 16:37:30
depth1
children1
last_payout2019-05-04 16:37:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length290
author_reputation12,037,856,753,124
root_title"Training a car for an autonomous race"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id83,849,430
net_rshares376,032,236
author_curate_reward""
vote details (1)
@codelikeamother ·
RE:
Thanks! That said I wouldn't be overly enthusiastic about this case - it's clearly aimed at promoting new services by creating a wider user base :)
I wouldn't allow myself to train a real size car ;)
properties (22)
authorcodelikeamother
permlinkre-cubapl-re-codelikeamother-training-a-car-for-an-autonomous-race-20190501t051152142z
categoryprogramming
json_metadata{"app":"engrave"}
created2019-05-01 05:11:54
last_update2019-05-01 05:11:54
depth2
children0
last_payout2019-05-08 05:11:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length199
author_reputation3,544,171,499,075
root_title"Training a car for an autonomous race"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id84,048,764
net_rshares0
@curie ·
Congrats on a Curie vote!
Hi codelikeamother,
<div class="pull-right">
https://steemitimages.com/DQmXgrYG8AKimJKRSu2urPB5SPcftN6GCGx2gVJJMwBkuTu/Curie%20Logo%2075px.png
</div>
This post  has been upvoted by the Curie community curation project and associated vote trail as exceptional content (human curated and reviewed).  Have a great day :) <br>
 
Visit <a href="http://curiesteem.com/">curiesteem.com</a> or join the <a href="https://discord.gg/G6RPUMu">Curie Discord community</a> to learn more.
properties (22)
authorcurie
permlinkre-training-a-car-for-an-autonomous-race-20190427t091750
categoryprogramming
json_metadata""
created2019-04-27 09:17:51
last_update2019-04-27 09:17:51
depth1
children0
last_payout2019-05-04 09:17:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length474
author_reputation613,039,945,737,625
root_title"Training a car for an autonomous race"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id83,834,189
net_rshares0
@oadissin ·
Amazing tools.
Thank you for sharing this informative post.
I am very curious to watch the future implication of the usage of this AWS machine.
Peace
👍  
properties (23)
authoroadissin
permlinkre-codelikeamother-training-a-car-for-an-autonomous-race-20190428t083333700z
categoryprogramming
json_metadata{"tags":["programming"],"app":"steemit/0.1"}
created2019-04-28 08:33:33
last_update2019-04-28 08:33:33
depth1
children0
last_payout2019-05-05 08:33:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length149
author_reputation471,272,235,488,659
root_title"Training a car for an autonomous race"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id83,878,305
net_rshares367,523,426
author_curate_reward""
vote details (1)
@steemitboard ·
Congratulations @codelikeamother! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

<table><tr><td>https://steemitimages.com/60x70/http://steemitboard.com/@codelikeamother/voted.png?201904270943</td><td>You received more than 1000 upvotes. Your next target is to reach 2000 upvotes.</td></tr>
</table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@codelikeamother) and compare to others on the [Steem Ranking](http://steemitboard.com/ranking/index.php?name=codelikeamother)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>



###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-codelikeamother-20190427t143822000z
categoryprogramming
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2019-04-27 14:38:21
last_update2019-04-27 14:38:21
depth1
children0
last_payout2019-05-04 14:38:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length860
author_reputation38,975,615,169,260
root_title"Training a car for an autonomous race"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id83,844,768
net_rshares0
@steevebot ·
This story was recommended by Steeve to its users and upvoted by one or more of them.

Check @steeveapp to learn more about Steeve, an AI-powered Steem interface.
properties (22)
authorsteevebot
permlinkre-codelikeamother-training-a-car-for-an-autonomous-race-vote-beneficiaries
categoryprogramming
json_metadata{"tags":["programming"],"app":"steeve/0.1","format":"markdown"}
created2019-04-27 19:15:09
last_update2019-04-27 19:15:09
depth1
children0
last_payout2019-05-04 19:15:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length164
author_reputation1,016,697,284,644
root_title"Training a car for an autonomous race"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id83,855,066
net_rshares0