From 43f559c27817910b76c2269ec6d0cf470f6cba2e Mon Sep 17 00:00:00 2001 From: Utkarshmishra04 Date: Tue, 7 Sep 2021 13:31:24 +0530 Subject: [PATCH 1/2] minor link fix --- _pages/quick_start/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pages/quick_start/tutorial.md b/_pages/quick_start/tutorial.md index 9e2440f2..234aa7ba 100644 --- a/_pages/quick_start/tutorial.md +++ b/_pages/quick_start/tutorial.md @@ -1,7 +1,7 @@ --- title: Behavior Metrics tutorial using Tensoflow TF logo layout: posts -permalink: /quick_start/tutorial +permalink: /quick_start/tutorial/ collection: posts From b03fe7ac41a9c1200b51555bd5006d601717b4b7 Mon Sep 17 00:00:00 2001 From: Utkarshmishra04 Date: Tue, 7 Sep 2021 13:43:47 +0530 Subject: [PATCH 2/2] minor link fix --- _pages/quick_start/tutorial.md | 39 ++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/_pages/quick_start/tutorial.md b/_pages/quick_start/tutorial.md index 234aa7ba..29c1333c 100644 --- a/_pages/quick_start/tutorial.md +++ b/_pages/quick_start/tutorial.md @@ -1,5 +1,5 @@ --- -title: Behavior Metrics tutorial using Tensoflow TF logo +title: Behavior Metrics tutorial using Tensoflow TF logo and PyTorch Pytorch logo layout: posts permalink: /quick_start/tutorial/ @@ -14,31 +14,48 @@ sidebar: In this tutorial, you will train your first follow line brain for the F1 that can be run on Behavior Metrics. -1. First of all, make sure you have Behavior Metrics installed, following the [installation section](/install/). You can try running the *explicit brain* that is +**Step 1.** First of all, make sure you have Behavior Metrics installed, following the [installation section](/install/). You can try running the *explicit brain* that is already included on Behavior Metrics brains folder. This brain is capable of finishing every circuit available for the project. -2. All the deep learning brains with their code can be located at [Deep Learning Studio's repo](https://github.com/JdeRobot/DeepLearningStudio). +**Step 2.** All the deep learning brains with their code can be located at [Deep Learning Studio's repo](https://github.com/JdeRobot/DeepLearningStudio). For this tutorial, we will be using PilotNet architecture, a CNN based solution for self-driving cars. You can navigate to the previous repo to the [Formula 1-Follow line folder](https://github.com/JdeRobot/DeepLearningStudio/tree/main/Formula1-FollowLine), where both implementations for pytorch and tensorflow are located. -We will use tensorflow TF logo . -3. Follow the step on that repo for generating a new deep learning model using tensorflow and PilotNet. On that repo you will find information about how to download the dataset +First, we will use tensorflow TF logo . + +1. Follow the step on that repo for generating a new deep learning model using tensorflow and PilotNet. On that repo you will find information about how to download the dataset and how to train the model. Using the examples shown there should be fine for this tutorial (you can explore different combinations afterwards 😄). -4. After training your first tensorflow model for the follow line problem, you will have a *.h5* file generated by the previous execution. +2. After training your first tensorflow model for the follow line problem, you will have a *.h5* file generated by the previous execution. -5. Take that *.h5* file and store it on *behavior_metrics/models/* creating a new folder *tensorflow_models*. +3. Take that *.h5* file and store it on *behavior_metrics/models/* creating a new folder *tensorflow_models*. -6. We're almost ready to go. Modify the *DL-tensorflow.yml* file under *behavior_metrics/configs/* folder, changing the *Model:* '[your_model_name].h5' with your model name. +4. We're almost ready to go. Modify the *DL-tensorflow.yml* file under *behavior_metrics/configs/* folder, changing the *Model:* '[your_model_name].h5' with your model name. -7. Execute Behavior Studio with the command +5. Execute Behavior Studio with the command ``` - python3 driver.py -c configs/default.yml -g + python3 driver.py -c configs/DL-tensorflow.yml -g ``` and your done. Press the **PLAY** button shown on the GUI and the f1 should be running! -**NOTE:** If you find any problem running this tutorial, create an issue on [Behavior Metrics repo](https://github.com/JdeRobot/BehaviorMetrics/issues/new) so we can help you. +Second, we will use pytorch Pytorch logo. + +1. Follow step 1 of the above Tensorflow TF logo tutorial. + +2. After training your first pytorch model for the follow line problem, you will have a *.ckpt* file generated by the previous execution. + +3. Take that *.ckpt* file and store it on *behavior_metrics/models/* creating a new folder *torch_models*. + +4. We're almost ready to go. Modify the *DL-torch.yml* file under *behavior_metrics/configs/* folder, changing the *Model:* '[your_model_name].ckpt' with your model name. +5. Execute Behavior Studio with the command + +``` + python3 driver.py -c configs/DL-torch.yml -g +``` + +and your done. Press the **PLAY** button shown on the GUI and the f1 should be running! +**NOTE:** If you find any problem running this tutorial, create an issue on [Behavior Metrics repo](https://github.com/JdeRobot/BehaviorMetrics/issues/new) so we can help you. \ No newline at end of file