블로그 이미지
개발자로서 현장에서 일하면서 새로 접하는 기술들이나 알게된 정보 등을 정리하기 위한 블로그입니다. 운 좋게 미국에서 큰 회사들의 프로젝트에서 컬설턴트로 일하고 있어서 새로운 기술들을 접할 기회가 많이 있습니다. 미국의 IT 프로젝트에서 사용되는 툴들에 대해 많은 분들과 정보를 공유하고 싶습니다.
솔웅

최근에 받은 트랙백

글 보관함

calendar

          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            


Udemy - AWS Machine Learning, AI, SageMaker - With Python




Summary


Section 3 Linear Regression


23. Summary


Squared Loss Function is parabolic in nature. It has an important property of not only telling us the loss at a given weight, but also tells us which way to go to minimize loss


Gradient Descent optimization algorithm uses loss function to move the weights of all the features and iteratively adjusts the weights until optimal value is reached


Batch Gradient Descent predicts y value for all training examples and then adjusts the value of weights based on loss. It can converge much slower when training set is very large. Training set order does not matter as every single example in the training set is considered before making adjustments.


Stochastic Gradient Descent predicts y value for next training example and immediately adjusts the value of weights. It can converge faster when training set is very large. Training set should be random order otherwise model will not learn correctly. AWS ML uses stochastic Gradient Descent



Section 4 AWS - Linear Regression Models


27. Concept - How to evaluate regression model accuracy?


Linear Regression - Residuals


- AWS ML Console provides a Histogram that shows distribution of examples that were over estimated and underestimated and to what extent

- Available as "explore model performance" option under Evaluation -> Summary

- Ideal: Over/Under estimation should be a normal curve centered at 0.

- Structural Issue: When you observe vast majority of example falling into one side. Adding more relevant features can help remedy the situation.


31. Model Performance Summary and Conclusion

RMSE (Root Mean Square Error) is the evaluation metric for Linear Regression. Smaller the value of RMSE, better the predictive accuracy of model. Perfect model would have RMSE of 0.


To prepare data for AWS ML, it requires data to be in

1. CSV file available in S3

2. AWS Redshift Datawarehouse

3. AWS Relational Database Service (RDS) MySQL DB


Batch Prediction results are stored by AWS ML to S3 in the specified bucket


We pulled the data from S3 to local folder and plotted them


Based on the distribution of data, AWS ML suggests a recipe for processing data.

In case of numeric features, it may suggest binning the data instead of treating a raw numeric

For this example, treating x as numeric provided best results






Section 5 Adding Features To Improve Model


35. Summary

1. Underfitting occurs when model does not accurately capture relationship between features and target

2. Underfitting would cause large training errors and evaluation errors   

  Training RMSE: 385.1816, Evaluation RMSE: 257.8979, Baseline RMSE: 437.311

3. Evaluation Summary - Prediction overestimation and underestimation histogram provided by AWS ML console provides important clues on how the model is behaving, under-estimation and over-estimation needs to be balanced and centered around 0

4. Box plot also highlights distribution differences between predicted and actual-negatives

5. To address underfitting, add higher order polynomials or more relevant features to capture complex relationship

  Training RMSE: 132.2032, Evaluation RMSE: 63.6847, Baseline RMSE: 437.311

6. When working with datasets containing 100s or even 1000s of features, it important to rely on these metrics and distribution to gain insight into model performance



Section 6 Normalization


37. Concept: Normalization to smoothen magnitude differences


Normalization Transformation (Numeric)

- When there are very large differences in magnitude of features, features that have large magnitude can dominate Model

- Example : We saw this in Quadratic Extra Features dataset

- Normalization is a process of transforming features to have a mean of 0 and variance of 1. This will ensure all features have similar scale

  : Feature normalized = (feature - mean) / (sigma)

    where,

mean = mean of feature x

sigma = standard deviation of feature x

  : Usage : normalize (numericFeature0

- Optimization algorithm may also converge faster with normalized features compared to features that have very large scale differences


39. Summary

1. Having lot of features and complex features can help improve prediction accuracy

2. When feature ranges are orders of magnitude different, it can dominate the outcome. Normalization is a process of transforming features to have a mean of 0 and  variance of 1. This will ensure all feature have similar scale.

3. Without Normalization:

  Training RMSE: 83973.66, Evaluation RMSE: 158260.62, Baseline RMSE: 437.31

4. With Normalization:

  Training RMSE: 72.35, Evaluation RMSE: 51.7387, Baseline RMSE: 437.31

5. Normalization can be easily enabled using AWS ML Transformation recipes



Section 7 Adding Complex Features

46. Summary

Adding polynomial features allows us fit more complex shapes


To add polynomial features that combines all input features, use sci-kit module library. Anaconda includes these modules by default


We saw good performance with degree 4 and any additional feature may bring incremental improvement, but with added complexity of managing features.


1. Model Degree 1 Training RMSE:0.5063, Evaluation RMSE:0.4308, Baseline RMSE:0.689

2. Model Degree 4 Training RMSE:0.2563, Evaluation RMSE:0.1493, Baseline RMSE:0.689

3. Model Degree 15 Training RMSE:0.2984, Evaluation RMSE:0.1222, Baseline RMSE:0.689




Section 8 Kaggle Bike Hourly Rental Prediction


50. Linear Regression Wrapup and Summary


AWS ML - Linear Regression

* Linear Model

* Gradient Descent and Stochastic Gradient Descent

* Squared Error Loss Function

* AWS ML Training, Evaluation, Interactive Prediction, Batch Prediction

* Prediction Quality

  - RMSE

  - Residual Histograms

* Data visualization

* Normalization

* Higher order polynomials



Section 9 - Logistic Regression Models


Image result for Linear vs. Logistic regression model

In short: Linear Regression gives continuous output. i.e. any value between a range of values. ... GLM(Generalized linear models) does not assume a linear relationship between dependent and independent variables. However, it assumes a linear relationship between link function and independent variables in logit model.


https://stackoverflow.com/questions/12146914/what-is-the-difference-between-linear-regression-and-logistic-regression


https://techdifferences.com/difference-between-linear-and-logistic-regression.html


58. Summary

Binary Classifier : Predicts positive class probability of an observation

Logistic or Sigmod function has an important property where output is between 0 and 1 for any input. This output is used by binary classifiers as a probability of positive class.

True Positive - Samples that are actual-positives correctly predicted as positive

True Negative - Samples that are actual-negatives correctly predicted as negative

False Negative - Sampleas that are actual-positives incorrectly predicted as negative

False Positive - Samples that are actual-negatives incorrectly predicted as positive

Logistic Loss Function is parabolic in nature. It has an important property of not only telling us the loss at a given weight. but also tells us which way to go to minimize loss

Gradient Descent optimization algorithm uses loss function to move the weights of all the features and iteratively adjusts the weights until optimal value is reached

Batch Gradient Descent predicts y value for all training examples and then adjusts the value of weights based on loss. It can converge much slower when training set is very large. Training set order does not matter as every single example in the training set is considered before making adjustments.

Stochastic Gradient Descent predicts y value for next training example and immediately adjusts the value of weights. It can converge faster when training set is very large. Training set should be random order otherwise model will not learn correctly. AWS ML uses stochastic Gradient Descent




Section 10 


62

Classification Metrics

True Positive = count(model correctly predicted positives). Students who passed exam correctly classified as pass.

True Negative = count (model correctly predicted negatives). Students who failed exam correctly classfied as fail.

False Positive = count (model misclassified negative as positive). Students who failed exam incorrectly classified as pass.

False Negative = count (model misclassified positive as negative). Students who passes exam incorrectly classified as fail.


* True Positive Rate, Recall, Probability of detection - Fraction of positive predicted correctly. larger value indicates better predictive accuracy.


TPR = True Positive / Actual Positive


* False Positive Rate, probability of false alarm - Fraction of negative predicted as positive. Smaller value indicates better predictive accuracy


FPR = False Positive / Actual Negative


* Precision - Fraction of true positive among all predicted positive. Larger value indicates better predictive accuracy


Precision = True Positive / Predicted Positive


* Accuracy - Fraction of correct predictions. Larger value indicates better predictive accuracy

Accuracy = True Positive + True Negative / negative

where, n is the number of examples


63. 

Classification Insights with AWS Histograms


Histogram - Binary Classifier


* Positive and Negative histograms

* Interactive tool to test effect of various cut-off thresholds

* Ability to save a threshold for the model

* Available under :

Model -> Evaluation Summary -> Explore Performance

https://docs.aws.amazon.com/machine-learning/latest/dg/binary-model-insights.html


64

Concept: AUC Metric


AUC - Binary Classifer

* Area Under Curve(AUC) metric - 0 to 1. Larger Value indicates better predictive accuracy

* AUC is the area of a curve formed by plotting True Positive Rate against False positive Rate at different cut-off thresholds

* AUC value of 0.5 is baseline and it is considered random-guess

* AUC closer to 1 indicates better predictive accuracy

* AUC closer to 0 indicates model has learned correct patterns, but flipping predictions (0's are predicted as 1's and vice versa).


69 Summary

For Binary Classification, Area Under Curve (AUC) is the evaluation metric to assess the quality of model


AUC is the area of a curve formed by plotting True Positive Rate against False Positive Rate at different cut-off thresholds.

* AUC metric closer to 1 indicates highly accurate prediction

* AUC metric 0.5 indicates random guess - Baseline AUC

* AUC metric closer to 0 indicates model has learned from the features, but predictions are flipped


Advanced Metrics

* Accuracy - Fraction of correct predictions. Larger value indicates better predictive accuracy

* True Positive Rate - Probability of detection. Out of all positive, how many were correctly predicted as positive. Larger value indicates better predictive accuracy

* False Positive Rate _ Probability of false alarm. Smaller value indicates better predictive accuracy. Out of all negatives, how many were incorrectly predicted as positive.

* Precision - out of all predicted as positive, how man are true positive? Larger value indicates better predictive accuracy.



Section 11

72 Concept: Evaluating Predictive Quality of Multiclass Classifiers


Multi-class metrics


* F1 Score - Harmonic mean of Recall and Precision. Larger F1 Score indicates better predictive accuracy. Binary Metic


F1 Score = 2.Precision.Recall / Precision + Recall


* Average F1 Score - For multi-class problems, average of class wise F1 score is used for accessing predictive quality


* Baseline F1 Score - Hypothentical model that predicts only most frequent class as the answer 


Concept: Confusion Matrix To Evaluating Predictive Quality


Multiclass - Metrics - Confusion Matrix


* Accessible from Model -> Evaluation Summary -> Explore Model performance


* Concise table that shows percentage and count of correct classification and incorrect classifications


* Visual look at model performance


* Up to 10 classes are shown - listed from most frequent to least frequent


* For more than 10 classes, first 9 most freq. classes are shown and 10th class will collapse rest of the classes and mark as otherwise

* Option to download confusion matrix


* https://docs.aws.amazon.com/machine-learning/latest/dg/multiclass-model-insights.html



77. Summary


Multi-Class Evaluation Metric

1. F1 Score is a binary classification metic. It is harmonic mean of precision and recall

F1 Score = 2 X Precision X Recall / (Precision + Recall)

Higher F1 Score reflects better predictive accuracy

2. Multi-Class Evaluation

Average of class wise F1 Score

3. Baseline F1 Score = Hypothetical model that predicts only most frequent class as the answer

4. Visualization - Confusion Matrix - Available on AWS ML Console

Matrix. Rows = true class. Columns = predicted class

Cell color - diagonal indicates true class prediction %

Cell color - non-diagonal indicates incorrect prediction %

Last column is F1 score for that class. Last but one column is true class distribution

Last row is predicted class distribution

Upto 10 classes are shown - listed from most frequent to least frequent

For more than 10 classes, first 9 most freq. classes are shown and 10th class will collapse rest of the classes and mark as otherwise

You can download the confusion matrix thru url-Explore Performance page under Evaluations


Prediction Summary

1. Eval with default recipe settings. Average F1 score: 0.905

2. Eval with numeric recipe settings: Average F1 score: 0.827

3. Batch prediction Results (predict all 150 example outcome)

  a. With default recipe settings: Average F1 Score: 0.973

  b. With numeric recipe settings:Average F1 Score: 0.78

4. Classification was better with binning. Versicolor classification was impacted when numeric setting was used

5. Higher F1 Score implies better prediction accuracy



Section 12 Text Based Classification with AWS Twitter Dataset


78. AWS Twitter Feed Classification for Customer Service

https://github.com/aws-samples/machine-learning-samples/tree/master/social-media 


79. Lab: Train, Evaluate Model and Assess Predictive Quality, 80. Lab: Interactive Prediction with AWS

- Practice


81. Logistic Regression Summary


AWS ML - Logistic Regression

- Linear Model

- Logistic/Sigmoid Function to produce a probability

- Stochastic Gradient Descent

- Logistic Loss function

- AWS ML Training, Evaluation, Interactive Prediction, Batch Prediction

- Prediction Quality 

  : TPR

  : FPR

  : Accuracy

  :Prediction

  : AUC Metrics

  : F1 Score

  : Average F1 Score for multi-class

- Data visualization

- Text Processing

- Normalization

- Higher order polynomials




Section 13


82. Recipe Overview


Recipe

- Recipe is a set of instructions for pre-processing data

- Recipe is a JSON like document

- Consists of three parts: Groups, Assignments, Outputs

- Groups - Groups are collection of features for which similar transformation needs to be applied

  : Built-in Group : ALL_TEXT, ALL_NUMERIC, ALL_CATEGORICAL, ALL_BINARY

  : Define your own groups

- Assignments - Enable creation of new features derived from existing ones

- Outputs - List features used for learning process and optionally apply transformation


Recipe is automatically applied to training data, evaluation data and to data submitted through real-time and batch prediction APIs


83. Recepe Example


84. Text Transformation


* N-gram Text Transformation

- Tokenizes input text and combines them into a slideing window of n-words, where n is specified in the recipe

- Usage: ngram(textFeature, n), where n is the size

- By default all text data is tokenized with n=1

  : Example: "Customer requests urgent response" text is tokenized as {"Customer", "requests", "urgent", "response"}

- With n=2, it generates one word and two word combinations

  : {"Customer requests", "requests urgent", urgent response", "Customer", "requests", "urgent", "response"}

- N-grams of size up to 10 is supported

- N-grams breaks texts at whitespace. Punctuations will be considered part of word

- You can remove punctuations using no_punct transformation


* OSB Text Transformation

- Orthogonal Spare Bigram (OSB) Transformation provides more word combinations compared to n-gram

- Usage: osb(textFeature, size)

- Puts one underscore to indicate word boundary as well as every word skipped

- For example (AWS Document provided sample).

https://docs.aws.amazon.com/ko_kr/machine-learning/latest/dg/data-transformations-reference.html

Text: "The quick brown fox jumps over the lazy dog". osb(text,4)

WINDOW,{OSB GENERATED}

"The quick brown fox", {The_quick, The__brown, The___fox}

"quick brown fox jumps", {quick_brown, quick__fox, quick___jumps}

"brown fox jumps over", {brown_fox, brown__jumps, brown___over}

"fox jumps over the", {fox_jumps, fox__over, fox___the}

"jumps over the lazy", {jumps_over, jumps__the, jumps___lazy}

"over the lazy dog", {over_the, over__lazy, over___dog}

"the lazy dog", {the_lazy, the__dog}

"lazy dog", {lazy_dog}


* Lowercase and Punctuation


- Lower Case Transformation converts text to lowercase

  : Usage : lowercase(textFeature)

  : Example: "The Quick Brown Fox Jumps Over the Lazy Dog" ->  "the quick brown fox jumps over the lazy dog"

- Remove punctuation Transformation - removes punctuations at word boundaries

  : Usage: nopunct(textFeature)

  : Example: "Customer Number: 123. Ord-No: AB1235" will be by default tokenized as

    {"Customer","Number:","123.","Ord-No:","AB1235"}

  : With nopunct transformation -> {"Customer","Number","123","ord-No","AB1235"}

  : Note: only prefix, suffix punctuations are removed. Embedded punctuations are not removed "Ord-No"

  

85. Numeric Transformation - Quantile Binning


* Quantile Binning Transformation (Numeric)

- Used for converting a numeric value into a categorical bin number

- Usage: quantile_bin(numericFeature, n), where n is the number of bins

- AWS ML uses this information to establish n bins of equal size based on the distribution of all values of the specified numeric feature.

- It then maps incoming numericFeature value to corresponding bin and outputs bin number as categorical value

- AWS ML Recommendation: In some cases, relationship between numeric variable and target is not linear...... binning might be usful in those scenarios

- We actually saw where binning improved predictive accuracy with Iris Dataset


86. Numeric Transformation - Normalization


Normalization Transformation (Numeric)


- When there are very large differences in magnitude of features, features that have large magnitude can dominate Model

- Example: We saw this in Quadratic Extra Features dataset

- Normalization is a process of transforming features to have a mean of 0 and variance of 1. This will enshre all features have similar scale.

  : Example Feature normalized = (feature - mean)/(sigma)

    where,

mean = mean of feature x

sigma = standard deviation of feature x

  : Usage normalize(numericFeature)

- Optimization algorithm may also converge faster with normalized features compared to features that have very large scale differences


87. Cartesian Product Transformation - Categorical and Text


* Cartesian Product Transformation (Categorical, Text)

- Cartesian transformation generates permutations of two or more text and categorical input variables

- For example: Season and Hour combined may have stronger influence on bike rentals. Instead of treating these two as separate features, we can create a new feature Season_Hour that will combine these values.

- Usage cartesian(feature1, feature2)

- Combined features may be able to more accurately related the target attribute

Table


88. Summary

Data Transformation



Section: 14 Hyper Parameters, Model Optimization and Lifecycle

Hyper Parameters allow you to control the model building process and quality


90. Data Rearrangement, Maximum model Size, passes, Shuffle Type

Table



93. Improving Model Quality

Optimizing Model

- To improve a model following are some options

  : Add more training examples

  : Add more relevant features

  : Model hyperparameter tuning

- Quality Metrics of Training Data and Evaluation Data can provide important clues to improve model performance



94. Model Maintenance


- Models may need to be periodically rebuilt or updated to 

  : Keep in-sync with new patterns

  : Support new more relevant features

  : Support new class - in multi - class problems

  : Changes in assumptions or distribution of data that was used to train model

  : Changes to cut-off threshold

  Example: Home price changes month to month depending on several factors

- Have a plan to evaluate model with new data periodically. Example: Weekly, Monthly, Quartly

- Models are probabilistic in nature...

  : Binary Class - Provides bestAnswer(1 or 0) and a raw prediction score. Cut-off score is configurable

  : Multi Class - Provides prediction score for each class. It can be interpreted as probability of observation belonging to the class. Class with highest score is the best answer

  : Regression : Provides a score that contains raw numeric prediction of the target attribute.

- When models are changed, predicted results would also change - Quality metrics like AUC, F1 Score, RMSE can be used to determine whether to go ahead with proposed model change


95. AWS Machine Learning System Limits

- AWS ML imposes certain limits to ensure robust and reliable service

- Some are soft limits and can be increased by contacting AWS Customer Service

- Size of each observation: 100KB

- Size of training data: 100GB

- Size of batch prediction input: 1TB (single file limit. can be overcome by creating more batch files)

- No. of records per batch file: 100 million

- No. of variables/features: 10,000

- Throughput per second for realtime prediction: 200 requests/second

- Max Number of classes per multi-class model: 100


96. AWS Machine Learning Pricing


- Data Analysis and Model Building Fee - $0.42 per Hour of building time

  : Number of computer hours required for data analysis, model training and evaluation

  : Depends on size of input data, attributes, types of transformations applied

- Predictions Fees

  : Batch predictions - $0.10/1,000 predictions founded to the nearest 1,000

  : Real-time predictions - $0.0001 per prediction + Capacity reservation charge of $0.001 per hour for each 10MB provisioned for your model

  

Section 15 Integration of AWS Machine Learning With Your Application


98. Introduction


AWS ML Integration


- Speed!

  : Turn your ideas into cool products in a matter of days

  : Traditional approach would require months

  

- Highly scalable, secure service with redundancy built-in

  : Scale automatically to train model with very large datasets

  : Scale automatically to support high volume prediction needs

  : Real-time prediction with capacity reservation

  : Secure - Limit access to Authenticated and Authorized services and users

  

- Server less!


- Software Integration

  : AWS Machine Learning - Complete functionality is accessible through SDK and Command Line Interfaces

  : Model building and Prediction can be fully automated using SDK

  : AWS SDKs in multiple lanuages - Python, Java, .NET, Javascript, Ruby, C++, ....

  : Complete list languages https://aws.amazon.com/tools/ 

  

99. Integration Scenarios


Connectivity and Security Options


- You Data Center -> AWS ML Cloud Service  

  : Security: Key Based Authentication + IAM Policy + SSL

- AWS Hosted Application -> AWS ML Cloud Service

  : Security : IAM Role + SSL

- Browser, Apps on Phone -> AWS ML Cloud Service

  : Option 1: AWS Cognito Based Authentication + IAM Role + SSL

  : Choice of authentication providers: Cognito, Google, Amazon, Facebook, Twitter, OpenID, Customer

  : Option 2 : Key Based Authentication + IAM Policy + SSL


100. Security using IAM


Users belong to AWS root account. Cognito Users are application level users. Application belongs to AWS root account.




Troubleshooting

2019.01.01 14:01 | Posted by 솔웅








Troubleshooting AWS DeepRacer Issues


Here you'll find troubleshooting tips for frequently asked questions as well as late-coming bug fixes.


여기 자주 묻는 질문과 최근에 수정된 버그 관련한 troubleshooting tips들이 있습니다.






How to Switch AWS DeepRacer Compute Module Power Source from Battery to Power Outlet?


If the compute module battery level is low when you set up your AWS DeepRacer for the first time, follow the steps below to switch the compute power supply from the battery to a power outlet:


처음으로 AWS DeepRacer를 설정할 때 컴퓨팅 모듈 배터리 수준이 낮 으면 다음 단계에 따라 배터리에서 전원 콘센트로 컴퓨팅 전원 공급 장치를 전환하십시오.


  1. Unplug the USB-C cable from the vehicle's compute power port.

    차량의 컴퓨 트 전원 포트에서 USB-C 케이블을 분리합니다.




2. Attach the AC power cord and the USB-C cable to the computer module power adapter (A). Plug the power cord to a power outlet (C) and plug the USB-C cable the vehicle's computer module power port (B).


AC 전원 코드와 USB-C 케이블을 컴퓨터 모듈 전원 어댑터 (A)에 연결하십시오. 전원 코드를 전원 콘센트 (C)에 꽂고 USB-C 케이블을 차량의 컴퓨터 모듈 전원 포트 (B)에 연결합니다.







How to Connect Your AWS DeepRacer to Your Wi-Fi Network?


To use your AWS DeepRacer, you must connect the vehicle to your home or office Wi-Fi network. To connect the vehicle to your Wi-Fi network, follow the steps below:


AWS DeepRacer를 사용하려면 차량을 가정용 또는 사무실 Wi-Fi 네트워크에 연결해야합니다. 차량을 Wi-Fi 네트워크에 연결하려면 다음 단계를 따르십시오.

  1. Have a USB flash drive on hand.
    USB 플래시 드라이브를 준비하십시오.

  2. Plug in the USB flash drive to your computer.
    USB 플래시 드라이브를 컴퓨터에 연결하십시오.

  3. Open a web browser on your computer and navigate tohttps://d1.awsstatic.com/deepracer/wifi-creds.txt to download the Wi-Fi configuration file and copy it to the USB drive.
    컴퓨터에서 웹 브라우저를 열고 https://d1.awsstatic.com/deepracer/wifi-creds.txt로 이동하여 Wi-Fi 구성 파일을 다운로드하고 USB 드라이브로 복사하십시오.

  4. Open the Wi-Fi configuration file in a text editor and type the name (SSID) and password of your Wi-Fi network in the corresponding fields.
    텍스트 편집기에서 Wi-Fi 구성 파일을 열고 해당 필드에 Wi-Fi 네트워크의 이름 (SSID)과 암호를 입력하십시오.

  5. Eject the USB drive from your computer and then plug it into the USB port on the back of the vehicle.
    컴퓨터에서 USB 드라이브를 추출한 다음 차량 후면의 USB 포트에 연결하십시오.





6. Watch the Wi-Fi LED on the vehicle to blink and then to turn blue. The vehicle is now connected to the Wi-Fi network. Unplug the USB drive and skip the next step.
차량의 Wi-Fi LED가 깜박이면 파란색으로 켜십시오. 이제 차량이 Wi-Fi 네트워크에 연결됩니다. USB 드라이브를 분리하고 다음 단계를 건너 뜁니다.


7. If the Wi-Fi LED turns red after blinking, unplug the USB drive from the vehicle. Plug the USB drive back to your computer, verify that the configuration contains the correct network name and password, correct any mistakes or typos, save the file. Repeat Step 5.
Wi-Fi LED가 깜박이면 빨간색으로 켜지면 USB 드라이브를 차량에서 분리하십시오. USB 드라이브를 컴퓨터에 다시 연결하고 구성에 올바른 네트워크 이름과 암호가 포함되어 있는지 확인하고 실수 나 오타를 수정하고 파일을 저장하십시오. 5 단계를 반복하십시오.



How to Charge the AWS DeepRacer Drive Module Battery?


Follow the steps below to charge your AWS DeepRacer drive module battery:


다음 단계에 따라 AWS DeepRacer 드라이브 모듈 배터리를 충전하십시오.

  1. Optionally remove from the vehicle the drive module battery.
    선택적으로 차량에서 드라이브 모듈 배터리를 제거하십시오.

  2. Attach the battery charger to the battery, as depicted as follows:
    다음과 같이 배터리 충전기를 배터리에 연결하십시오.


3. Plug the power cord of battery charger into a power outlet.
배터리 충전기의 전원 코드를 콘센트에 연결하십시오.



How to Charge the AWS DeepRacer Compute Module Battery?


Follow the steps below to charge your AWS DeepRacer compute module battery:


아래 단계에 따라 AWS DeepRacer 컴퓨팅 모듈 배터리를 충전하십시오.


  1. Optionally remove the compute module battery from the vehicle.
    선택적으로 차량에서 컴퓨팅 모듈 배터리를 제거하십시오.

  2. Attach the compute power charger to the compute module battery.
    컴퓨팅 파워 차저를 컴퓨팅 모듈 배터리에 연결하십시오.

  3. Plug the power cord of the compute battery charger into a power outlet.
    컴퓨터 배터리 충전기의 전원 코드를 전원 콘센트에 연결하십시오.




How to Maintain Vehicle's Wi-Fi Connection?


The following troubleshooting guide provides you tips for maintaining your vehicle's connection.


다음 문제 해결 안내서는 차량 연결을 유지 보수하기위한 요령을 제공합니다.



How to Troubleshoot Wi-Fi Connection if Vehicle's Wi-Fi LED Indicator Flashes Blue, Then Turns Red for Two Seconds, and Finally Off?

Wi-Fi 연결 문제를 해결하는 방법 차량의 Wi-Fi LED 표시등이 파란색으로 깜박 인 다음 2 초 동안 빨간색으로 켜고 마지막으로 꺼지는 경우?


Check the following to verify you have the valid Wi-Fi connection settings.


유효한 Wi-Fi 연결 설정을 확인하려면 다음을 확인하십시오.


  • Verify that the USB drive has only one disk partition with only one wifi-creds.txt file on it. If multiple wifi-creds.txt files are found, all of them will be processed in the order they were found, which may lead to unpredictable behavior.
    USB 드라이브에 wifi-creds.txt 파일이 하나만있는 디스크 파티션이 하나만 있는지 확인하십시오. 여러 wifi-creds.txt 파일을 찾으면 모든 파일이 발견 된 순서대로 처리되므로 예기치 않은 동작이 발생할 수 있습니다.

  • Verify the Wi-Fi network's SSID and password are correctly specified in wifi-creds.txt file. An example of this file is shown as follows:

    Wi-Fi 네트워크의 SSID 및 비밀번호가 wifi-creds.txt 파일에 올바르게 지정되어 있는지 확인하십시오. 이 파일의 예는 다음과 같습니다.


###################################################################################
#                                   AWS DeepRacer                                 #
# File name: wifi-creds.txt                                                       #
#                                                                                 # 
# ...                                                                             #
###################################################################################

# Provide your SSID and password below
ssid: ' MyHomeWi-Fi'
password: myWiFiPassword


  • Verify both the field names of ssid and password in the wifi-creds.txt file are in lower case.
    wifi-creds.txt 파일의 ssid 및 password 필드 이름이 모두 소문자인지 확인하십시오.

  • Verify that each of the field name and value is separated by one colon (:). For example. ssid : ' MyHomeWi-Fi'
    각 필드 이름과 값이 콜론 (:)으로 구분되어 있는지 확인하십시오. 예를 들어. ssid : 'MyHomeWi-Fi'

  • Verify that the field value containing a space is enclosed by a pair of single quotes. On Mac, TextEdit or some other text editor shows single quotes as of the '...' form, but not of ‘...’. If the field value does not contain spaces, the value can be without single quotes.
    공백이 포함 된 필드 값이 작은 따옴표로 묶여 있는지 확인하십시오. Mac에서는 TextEdit 또는 다른 텍스트 편집기에서 '...'형식으로 작은 따옴표를 표시하지만 '...'는 표시하지 않습니다. 필드 값에 공백이 없으면 작은 따옴표없이 값을 입력 할 수 있습니다.

What Does It Mean When the Vehicle's Wi-Fi or Power LED Indicator Flashes Blue?

차량의 Wi-Fi 또는 전원 LED 표시등이 파란색으로 깜박일 때의 의미는 무엇입니까?


If the USB drive contains wifi-creds.txt file, the Wi-Fi LED indicator flashes blue while the vehicle is attempting to connect to the Wi-Fi network specified in the file.


USB 드라이브에 wifi-creds.txt 파일이 있으면 차량이 파일에 지정된 Wi-Fi 네트워크에 연결을 시도하는 동안 Wi-Fi LED 표시등이 파란색으로 깜박입니다.


If the USB drive has the models directory, the Power LED flashes blue while the vehicle is attempting to load the model files inside the directory.


USB 드라이브에 models 디렉토리가 있으면 차량이 디렉토리 안에 모델 파일을로드하려고 시도하는 동안 전원 LED가 파란색으로 깜박입니다.


If the USB drive has both the wifi-creds.txt file and the models directory, the vehicle will process the two sequentially, starting with an attempt to connect to Wi-Fi and then loading models.


USB 드라이브에 wifi-creds.txt 파일과 models 디렉토리가 모두있는 경우 차량은 Wi-Fi에 연결 한 다음 모델을로드하려는 시도부터 시작하여 두 개를 순차적으로 처리합니다.


The Wi-Fi LED might also turn red for two seconds if the Wi-Fi connection attempt fails.


Wi-Fi 연결 시도가 실패하면 Wi-Fi LED가 2 초 동안 빨간색으로 변할 수 있습니다.


How Can I Connect to Vehicle's Device Console Using its Hostname?

호스트 이름을 사용하여 차량의 장치 콘솔에 어떻게 연결할 수 있습니까?


When connecting to the vehicle's device console using its hostname, make sure you type: https://hostname.local in the browser, where hostname value (of the AMSS-1234 format) is printed on the bottom of the AWS DeepRacer vehicle. )


호스트 이름을 사용하여 차량의 장치 콘솔에 연결할 때, 브라우저에 https : //hostname.local을 입력하십시오. 여기서 호스트 이름 값 (AMSS-1234 형식)이 AWS DeepRacer 차량 하단에 인쇄됩니다. )


How to Connect to Vehicle's Device Console Using its IP Address?

IP 주소를 사용하여 차량의 장치 콘솔에 연결하는 방법?


To connect to the device console using IP address as shown in the device-status.txt file (found on the USB drive), make sure the following conditions are met.


USB 드라이브에있는 device-status.txt 파일에 표시된대로 IP 주소를 사용하여 장치 콘솔에 연결하려면 다음 조건이 충족되는지 확인하십시오.


  • Check your laptop or mobile devices are in the same network as the AWS DeepRacer vehicle.
    랩톱 또는 모바일 장치가 AWS DeepRacer 차량과 동일한 네트워크에 있는지 확인하십시오.

  • Check if you have connected to any VPN, if so, disconnect first.
    VPN에 연결했는지 확인하십시오. 그렇다면 먼저 연결을 끊으십시오.

  • Try a different Wi-Fi network. For example, turn on personal hotspot on your phone.
    다른 Wi-Fi 네트워크를 사용해보십시오. 예를 들어 휴대 전화에서 개인 핫 스폿을 켭니다.





Document History for AWS DeepRacer Developer Guide

  • API version: latest

  • Latest documentation update: November 28, 2018

ChangeDescriptionDate
AWS DeepRacer Developer GuideInitial release of the documentation to help the AWS DeepRacer user to learn reinforcement learning and explore its applications for autonomous racing, using the AWS DeepRacer console, the AWS RoboMaker simulator, and a AWS DeepRacer scale model vehicle.November 28, 2018


AWS Glossary

Numbers and Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X, Y, Z









'IoT > AWS DeepRacer' 카테고리의 다른 글

Troubleshooting  (0) 2019.01.01
Drive Your Vehicle  (0) 2018.12.31
Train and Evaluate Models  (0) 2018.12.30
Secure Calling AWS Services  (0) 2018.12.26
Get Started with AWS DeepRacer  (0) 2018.12.25
AWS DeepRacer - AWS account Setup  (0) 2018.12.24
What Is AWS DeepRacer?  (0) 2018.12.23

Drive Your Vehicle

2018.12.31 11:19 | Posted by 솔웅


Drive Your AWS DeepRacer Vehicle


After you have finished training and evaluating a AWS DeepRacer model in the AWS DeepRacer simulator, you can deploy the trained model to your AWS DeepRacer vehicle, set the vehicle to drive itself based on the trained model, and evaluate the performance in a physical environment to mimic a real-world autonomous racing experience.


AWS DeepRacer 시뮬레이터에서 AWS DeepRacer 모델을 교육하고 평가를 마친 후에는 숙련 된 모델을 AWS DeepRacer 차량에 배치하고 훈련 된 모델을 기반으로 차량을 운전하도록 설정하고 실제 환경에서의 성능을 평가할 수 있습니다. 실제 자율 경주 경험을 모방합니다.


To drive your vehicle for the first time, you must set up the vehicle, install any software updates and calibrate its drive-chain system. Before doing that, let's get an inspection of the vehicle.


차량을 처음 운전하려면 차량을 설치하고 소프트웨어 업데이트를 설치하고 드라이브 체인 시스템을 보정해야합니다. 그렇게하기 전에 차량 점검을 시작하십시오.




Inspect Your AWS DeepRacer Vehicle


The first AWS DeepRacer vehicle available is the AWS DeepRacer car. It is a Wi-Fi-enabled and battery-powered 1/18 scale model car with a camera mounted on the front and a compute module on the chassis. The scale model car, also known as the scale car, is capable of driving itself by running inference in the compute module, based on a deployed reinforcement learning model. Without deploying any reinforcement learning model, you can drive the manually.


첫 번째 AWS DeepRacer 용으로 사용할 수 있는 것은  AWS DeepRacer car입니다. Wi-Fi가 가능하고 배터리 구동 방식의 1/18 스케일 모델 차량으로 전면에 카메라가 장착되고 섀시의 컴퓨팅 모듈이 장착되어 있습니다. 스케일 자동차라고도 불리는 스케일 모델 자동차는 배치 된 reinforcement learning 모델을 기반으로 컴퓨팅 모듈에서 추론을 실행하여 스스로를 운전할 수 있습니다. reinforcement learning 모델을 배치하지 않고 수동으로 운전할 수도 있습니다.


Specification of AWS DeepRacer Car

Your AWS DeepRacer vehicle consists of the following modules and accessories:


AWS DeepRacer 차량은 다음 모듈 및 액세서리로 구성됩니다.



Module Comments
Chassis (1) Including the camera (1a) and the compute module (1b).
Compute module (1b) To run inference on a trained AWS DeepRacer model for autonomous driving.
Camera (1a) To interact with the vehicle's environment. Images captured by the camera can be streamed into the streaming video player on the vehicle's device console
Compute module battery (2) To power the compute module to run inference on a downloaded AWS DeepRacer model.
Compute module-battery connector cable (3) USB C-to-USB C cable to connect the compute module (1b) with the battery (2).
Compute module power cord (4) To charge the compute module and the compute module battery.
Compute module power adapter (5) To charge the compute module and the compute module battery.
Pins (6) Including the spare ones (in black), to fasten parts to the chassis.
Cover (7) To be removed when setting up the vehicle.
Drive module power charger (8) To charge the drive module battery.
Drive module power adapter (9) To charge the drive module battery.
Drive module battery (10) To power the vehicle drive module.
USB-to-μUSB cable (11) To support USB-OTG functionality.



To get your AWS DeepRacer vehicle running, make sure that you have following items ready:


AWS DeepRacer 차량이 작동하게하려면 다음 품목이 준비되어 있어야합니다.


  • A computer with a USB port and access to the internet.

  • A USB flash drive.

  • A Wi-Fi network.

  • An AWS account.


Set Up Your AWS DeepRacer Vehicle


To set up your AWS DeepRacer, go to https://aws.amazon.com/startyourengines and follow the on-screen instructions to prep the vehicle. The preparation includes


AWS DeepRacer를 설정하려면 https://aws.amazon.com/startyourengines로 이동 한 다음 화면의 지시에 따라 차량을 준비하십시오. 준비 내용은 다음과 같습니다.


  • Assemble the vehicle.

  • Configure the Wi-Fi connection of the vehicle.

  • Get the IP address of the vehicle's device console.

  • Update your vehicle's software, if a newer version is available.

  • Test signing in to the vehicle's device console.


After the preparation, you can proceed with testing drive your vehicle. For the instructions, see Drive Your AWS DeepRacer Vehicle.


준비가 끝나면 차량 운전 시험을 계속할 수 있습니다. 자세한 지침은 AWS DeepRacer 차량 운전을 참조하십시오.


Before going for a ride, you may want to calibrate your AWS DeepRacer vehicle to align the wheels, to set maximum steering, and to limit maximum throttle. For instructions, see Calibrate Your AWS DeepRacer Vehicle.


주행하기 전에 바퀴를 정렬하고 최대 조향을 설정하고 최대 스로틀을 제한하기 위해 AWS DeepRacer 차량을 보정해야 할 수 있습니다. 자세한 내용은 AWS DeepRacer 차량 보정을 참조하십시오.





Calibrate Your AWS DeepRacer Vehicle


Either before or after test driving your vehicle, you may want to calibrate the vehicle. To do so, follow the steps below:


차량 운전 시험 전후에 차량 보정을 원할 수 있습니다. 그렇게하려면 다음 단계를 따르십시오.


To calibrate your AWS DeepRacer vehicle:

  1. Open the device console of your vehicle at https://{your_vehicle_device_console_ip_address}.

  2. Open the Calibration page.

  3. Calibrate the vehicle's controls, including the maximum throttle.

  4. On the Calibration page, choose Edit in Steering and then follow the steps below to calibrate the vehicle's steering:
    보정 페이지에서 스티어링에서 편집을 선택한 다음 아래 단계에 따라 차량의 조향 보정을 조정하십시오.

    1. Raise the vehicle so that the wheels are free to rotate. Choose Next.
      바퀴가 자유롭게 회전 할 수 있도록 차량을 들어 올리십시오. 다음을 선택하십시오.

    2. Under Calibrate center on the device console, gradually move the slider to the position where the vehicles wheels become aligned in parallel. Set a number (e.g., 0) to record the position as the centering position. Choose Next.
      장치 콘솔의 조정 센터에서 차량 휠이 평행하게 정렬되는 위치로 슬라이더를 점차 이동하십시오. 위치를 중심 위치로 기록하는 숫자 (예 : 0)를 설정하십시오. 다음을 선택하십시오.

    3. Under Calibrate left steering on the device console, gradually move the slider to the left until the vehicle front wheels stops turning left. Set a number (e.g., -25) to record the position as the left maximum steering. Choose Next.
      장치 콘솔의 왼쪽 조정 조정에서 차량 앞 바퀴가 왼쪽으로 돌아갈 때까지 슬라이더를 점차 왼쪽으로 움직입니다. 왼쪽 최대 조정으로 위치를 기록하려면 숫자 (예 : -25)를 설정하십시오. 다음을 선택하십시오.

    4. Under Calibrate right steering on the device console, gradually move the slider to the right until the vehicles front wheels stop turning right. Set a number (e.g., 25) to record the position as the right maximum steering. Choose Done.
      장치 콘솔에서 오른쪽 조타 보정 아래에서 차량 앞 바퀴가 오른쪽으로 회전하는 것을 멈출 때까지 슬라이더를 점차 오른쪽으로 움직입니다. 오른쪽 최대 조정으로 위치를 기록하는 숫자 (예 : 25)를 설정합니다. 완료를 선택하십시오.   

  5. On the Calibration page, choose Edit for Throttle and then follow the steps below to calibrate the vehicle's throttle:
    보정 페이지에서 스로틀에 맞게 편집을 선택한 다음 아래 단계에 따라 차량의 스로틀을 보정하십시오.

    1. Raise the vehicle so that the wheels are free to turn. Choose Next on the device console.
      바퀴가 자유롭게 회전 할 수 있도록 차량을 들어 올리십시오. 장치 콘솔에서 다음을 선택하십시오.

    2. Under Calibrate stopped throttle on the device console, gradually move the slider to a position where the vehicles wheels stops turning. Set the number 0) to record the position as the stopped throttle. Choose Next.
      장치 콘솔에서 정지 된 스로틀 보정에서 점차적으로 슬라이더를 차량 바퀴가 돌지 않는 위치로 이동하십시오. 번호 0을 설정하십시오.) 정지 된 스로틀로 위치를 기록하십시오. 다음을 선택하십시오.

    3. Under Calibrate forward throttle on the device console, gradually move the slider to a position until the vehicle wheels reaches their forward maximum speed. Set a number between 1 and 100 (e.g., 50) to record the position as the forward maximum speed. Choose Next.
      장치 콘솔에서 정방향 스로틀 조정에서 차량 바퀴가 최대 속도에 도달 할 때까지 슬라이더를 점차적으로 움직이십시오. 최대 속도로 위치를 기록하려면 1에서 100 사이의 숫자 (예 : 50)를 설정하십시오. 다음을 선택하십시오.

    4. Under Calibrate backward throttle on the device console, gradually move the slider to a position until the vehicles wheels reach their backward maximum speed. Set a number between -100 and -1 (e.g., -50) to record the position as the backward maximum speed. Choose Done.
      장치 콘솔에서 역방향 스로틀 보정에서 차량 바퀴가 후진 최대 속도에 도달 할 때까지 슬라이더를 점차적으로 위치로 이동합니다. -100에서 -1 사이의 숫자 (예 : -50)를 설정하여 역방향 최대 속도로 위치를 기록합니다. 완료를 선택하십시오.



Build Your AWS DeepRacer Track


To build your own track to race your AWS DeepRacer vehicle and to achieve the best results, pay attention to the following factors.


AWS DeepRacer 차량 경주를위한 자신의 트랙을 만들고 최상의 결과를 얻으려면 다음 요소에주의하십시오.


  • Build your track to replicate the environment used in training. This is because models trained to follow track based on the road markings can exhibit different behaviors than models trained to follow the track based on other conditions or features.
    트랙을 제작하여 교육에 사용 된 환경을 복제하십시오. 도로 표식을 기반으로 추적하는 모델은 다른 조건이나 기능을 기반으로 추적 된 모델과 다른 행동을 나타낼 수 있기 때문입니다.

  • Lay out your track using the same shape as the shape of the training track. For example, if you have uploaded to your vehicle a model trained on the Re:invent 2018 track, your track shape should look like this:
    트레이닝 트랙의 모양과 같은 모양을 사용하여 트랙을 배치하십시오. 예를 들어 Re : invent 2018 트랙에서 훈련 된 모델을 차량에 업로드 한 경우 트랙 모양은 다음과 같아야합니다.




  • Restrict the curb-side (turning) radius to the following limits:
    커브 쪽 (선회) 반지름을 다음 제한값으로 제한하십시오.

    • At least 45 inches for corners smaller than or equal to 90 degrees
      모서리가 90도 이하인 경우 최소 45 인치

    • At least 55 inches for corners greater than 90 degrees.
      모서리가 90도 이상인 경우 최소 55 인치.

  • Construct the track to have a smooth and uniform color surface of at least 30 inches wide and with minimal resistance.
    최소한 30 인치 너비의 부드럽고 균일 한 색 표면과 최소한의 저항을 지니도록 트랙을 만듭니다.

  • Mark the track along the both sides with clear, unbroken and uniform-colored lines of 2-inch wide. The color of the markings should be of high contrast with respect to the track surface and barriers. Duct tapes have shown to be effective in some experiments.
    2 인치 너비의 명확하고 깨지지 않고 균일 한 색상의 선으로 양쪽면을 따라 트랙을 표시하십시오. 표시의 색은 궤도면과 장벽에 대해 높은 콘트라스트 여야합니다. 덕트 테이프는 일부 실험에서 효과가있는 것으로 나타났습니다.

  • Paint the off-track surface a color of sufficient contrast with respect to the on-track surface color.
    트랙 표면의 색상과 대비하여 오프 트랙 표면에 충분한 대비 색상을 칠합니다.

  • For safety reasons, encircle the track with uniform-colored barriers of at least 2.5 feet tall and at 2 feet away from the track at all points along the track.
    안전상의 이유로, 트랙을 따라 모든 지점에서 최소 2.5 피트, 트랙에서 2 피트 떨어진 균일 한 색상의 장벽을 사용하여 트랙을 둘러싸십시오.

The following example track represents a scaled version of the track used at re:Invent 2018.


다음 예제 트랙은 Invent 2018에서 사용 된 트랙의 스케일 버전을 나타냅니다.





Drive Your AWS DeepRacer Vehicle


After setting up your AWS DeepRacer vehicle, you can start to drive your vehicle manually or let it drive autonomously, using the vehicle's device console.


AWS DeepRacer 차량을 설치 한 후에는 차량의 장치 콘솔을 사용하여 수동으로 차량을 주행하거나 자율 주행 할 수 있습니다.


For autonomous driving, you must have trained an AWS DeepRacer model and have the trained model artifacts deployed to the vehicle. In the autonomous racing mode, the model running in the inference engine controls the vehicle's driving directions and speed. Without a trained model downloaded to the vehicle, you can use the vehicle's device console to drive the vehicle manually.


자율 주행을 위해서는 AWS DeepRacer 모델을 교육하고 숙련 된 모델 아티팩트를 차량에 배치해야합니다. 자율 레이싱 모드에서는 추론 엔진에서 실행되는 모델이 차량의 주행 방향과 속도를 제어합니다. 훈련 된 모델을 차량에 다운로드하지 않으면 차량의 장치 콘솔을 사용하여 차량을 수동으로 운전할 수 있습니다.


Drive Your AWS DeepRacer Vehicle Manually

If you have not trained any model or have not deployed any trained model to your AWS DeepRacer vehicle, you can't let it drive itself. But you can drive it manually.

To drive a AWS DeepRacer vehicle manually, follow the steps below.


모델을 교육하지 않았거나 숙련 된 모델을 AWS DeepRacer 차량에 배치하지 않은 경우 자체 모델을 운전하게 할 수 없습니다. 그러나 수동으로 운전할 수 있습니다.


To drive your AWS DeepRacer vehicle manually


AWS DeepRacer 차량을 수동으로 주행하려면 다음 단계를 따르십시오.


  1. If you have not already done so, sign in to your vehicle device console, using your computer, tablet or mobile phone. For more information, see Set Up Your AWS DeepRacer Vehicle .
    아직하지 않았다면 컴퓨터, 태블릿 또는 휴대 전화를 사용하여 차량용 장치 콘솔에 로그인하십시오. 자세한 내용은 AWS DeepRacer 차량 설정을 참조하십시오.

  2. On the vehicle's streaming video player on the device console, click, tap or touch a position within the displayed track to drive the vehicle. The track image displayed on the video player is from the vehicle's camera.
    기기 콘솔의 차량 스트리밍 비디오 플레이어에서 표시된 트랙 내의 위치를 클릭하거나 탭하거나 터치하여 차량을 운전하십시오. 비디오 플레이어에 표시된 트랙 이미지는 차량의 카메라에서 가져온 것입니다.

  3. Repeat Step 2 to continue driving the vehicle along the track.
    2 단계를 반복하여 트랙을 따라 차량 주행을 계속하십시오.


Drive Your AWS DeepRacer Vehicle Autonomously


To drive your AWS DeepRacer vehicle autonomously


AWS DeepRacer 차량을 자율적으로 운전하려면


  1. Make sure that you have a trained AWS DeepRacer model ready. If not, follow this quick-start instruction to train your model.
    숙련 된 AWS DeepRacer 모델을 준비하십시오. 그렇지 않은 경우이 빠른 시작 지침에 따라 모델을 교육하십시오.

  2. On the AWS DeepRacer console, choose a finished training job and then download the chosen model artifacts.
    AWS DeepRacer 콘솔에서 완료된 교육 작업을 선택한 다음 선택한 모델 아티팩트를 다운로드합니다.

  3. Connect your AWS DeepRacer vehicle to your computer via the USB cable and then copy the downloaded model artifacts to the Model folder on the USB drive.
    AWS DeepRacer 차량을 USB 케이블을 통해 컴퓨터에 연결 한 다음 다운로드 한 모델 아티팩트를 USB 드라이브의 Model 폴더에 복사하십시오.

  4. Follow the vehicle setup instructions to sign in to the vehicle's device console, and then do the following for autonomous driving:
    차량 설치 지침에 따라 차량의 장치 콘솔에 로그인 한 다음 자율 주행을 위해 다음을 수행하십시오.

    1. Choose the autonomous racing mode.
      자율 레이싱 모드를 선택하십시오.

    2. Choose a model from the list of the models downloaded in the previous step (Step 3). This will start loading the model into the inference engine and the process takes about 10 seconds to complete.
       이전 단계 (3 단계)에서 다운로드 한 모델 목록에서 모델을 선택하십시오. 이렇게하면 모델을 추론 엔진에로드하기 시작하고 프로세스 완료까지 약 10 초가 소요됩니다.

    3. Place your vehicle on the track, tap the Start Driving button to set the vehicle to drive itself.
      트랙에 차량을 놓고 Start Driving (운전 시작) 버튼을 탭하면 차량이 주행하도록 설정할 수 있습니다.

    4. Watch the vehicle drive on the physical track or the projected track on the device console.
      물리적 인 트랙이나 장치 콘솔의 투영 된 트랙에서 차량 드라이브를보십시오.

    5. After the vehicle stops (you may need to manually stop it), you can repeat from Step 4.2 to choose a different model for another drive.
      차량이 정지 한 후 (수동으로 정지해야 할 수도 있음), 4.2 단계를 반복하여 다른 드라이브의 다른 모델을 선택할 수 있습니다.



Restore Your AWS DeepRacer Vehicle to Factory Settings


At some point of time after trying out your AWS DeepRacer vehicle, you may want to reset the device to its factory settings and start afresh. The discussions presented below explains how to restore your AWS DeepRacer vehicle to factory settings.


AWS DeepRacer 차량을 사용해 본 후 어느 시점에서 장치를 공장 출하 상태로 재설정하고 다시 시작할 수 있습니다. 아래에 제시된 토론에서는 AWS DeepRacer 차량을 공장 설정으로 복원하는 방법에 대해 설명합니다.







Prepare for Factory Reset to Your AWS DeepRacer Vehicle


To prepare for the factory reset, you'll perform the following tasks:


초기화를 위해 다음 작업을 수행합니다.


  • Format the USB drive into the following two partitions:

    • FAT32 of 2GB

    • NTFS of at least 16GB

  • Make the USB drive bootable to start the factory reset on reboot:

    • Burn the required custom Ubuntu ISO image to the FAT32 partition to make the USB drive bootable.

    • Copy the required factory restore files to the NTFS partition of the USB drive.

Depending on the computer you use, specific tasks may differ from one operating system to another. To illustrate, we present the step-by-step instructions to prepare the USB drive using a computer running Ubuntu (e.g., the computer module of the AWS DeepRacer vehicle) and a computer running Windows.


사용하는 컴퓨터에 따라 특정 작업이 운영 체제마다 다를 수 있습니다. 예를 들어 Ubuntu를 실행하는 컴퓨터 (예 : AWS DeepRacer 차량의 컴퓨터 모듈)와 Windows를 실행하는 컴퓨터를 사용하여 USB 드라이브를 준비하는 단계별 지침을 제공합니다.



The instructions for using other Linux/Unix computers are similar to the Ubuntu instructions discussed below. You just need to replace the apt-get commands with the corresponding commands supported by the other Linux/Unix system of your choosing.


다른 Linux / Unix 컴퓨터 사용법은 아래에서 설명하는 Ubuntu 지침과 비슷합니다. apt-get 명령을 다른 Linux / Unix 시스템에서 지원하는 해당 명령으로 바꾸면됩니다.



Before starting to prepare for the factory reset, make sure you have the following items ready:


공장 초기화 준비를 시작하기 전에 다음 품목을 준비했는지 확인하십시오.


  • One USB flash drive of at least 32GB capacity.
    최소 32GB 용량의 USB 플래시 드라이브 1 개.

  • Your AWS DeepRacer vehicle to restore the factory settings to.
    공장 설정을 복원 할 AWS DeepRacer 차량.

  • A computer, when not using your AWS DeepRacer vehicle's compute module, to partition the USB drive and to make it bootable.
    컴퓨터가 AWS DeepRacer 차량의 컴퓨팅 모듈을 사용하지 않을 때 USB 드라이브를 분할하여 부팅 가능하게 만듭니다.




Partition and Make Bootable the USB Drive Using A Ubuntu Computer


In the following, we'll use the AWS DeepRacer vehicle computer module as a Ubuntu computer. The same instructions apply to a Linux computer running Ubuntu. The instructions on other flavors of Linux/Unix operating systems are similar. You just need to replace the apt-get * commands with their corresponding commands supported by the other Linux/Unix system of your choosing.


다음에서는 AWS DeepRacer 차량용 컴퓨터 모듈을 Ubuntu 컴퓨터로 사용하겠습니다. 동일한 지침이 Ubuntu를 실행하는 Linux 컴퓨터에도 적용됩니다. Linux / Unix 운영 체제의 다른 기능에 대한 지침도 비슷합니다. apt-get * 명령을 다른 Linux / Unix 시스템에서 지원하는 해당 명령으로 바꾸면됩니다.



To partition the USB drive and make it bootable


USB 드라이브를 파티션하고 부팅 가능하게하려면



1. To format the USB drive running Ubuntu commands on the AWS DeepRacer vehicle or a computer running Ubuntu:


Ubuntu 명령을 실행하는 USB 드라이브를 AWS DeepRacer 차량 또는 Ubuntu를 실행하는 컴퓨터에서 포맷하려면 다음을 수행하십시오.


a. On AWS DeepRacer vehicle compute module, run the following commands to install and launch GParted.


AWS DeepRacer 차량 계산 모듈에서 다음 명령을 실행하여 GParted를 설치하고 시작합니다.   


sudo apt-get update; sudo apt-get install gparted
sudo gparted



b. On the newly created GParted console, choose /dev/sda in the drop-down menu on the top-right corner and then delete all existing partitions.


새로 생성 된 GParted 콘솔의 오른쪽 상단 모서리에있는 드롭 다운 메뉴에서 / dev / sda를 선택한 다음 기존 파티션을 모두 삭제하십시오.



If the partitions are locked, right click to choose unmount.


파티션이 잠겨 있으면 마우스 오른쪽 버튼을 클릭하여 마운트 해제를 선택하십시오.





c. To create the FAT32 partition of 2GB capacity, choose the file icon on the top-left, set the parameters similar to the following., and then choose Add.


2GB 용량의 FAT32 파티션을 만들려면 왼쪽 상단의 파일 아이콘을 선택하고 다음과 유사한 매개 변수를 설정 한 다음 추가를 선택하십시오.





d. To create the NTFS partition of at least 16GB capacity, choose the file icon again, set the parameters similar to the following, and choose Add.


최소 16GB 용량의 NTFS 파티션을 만들려면 파일 아이콘을 다시 선택하고 다음과 유사한 매개 변수를 설정 한 다음 추가를 선택하십시오.





e. To apply the changes, choose the green tick.


변경 사항을 적용하려면 녹색 눈금을 선택하십시오.




2. To make the USB drive bootable from the FAT32 partition, follow the steps below:
FAT32 파티션에서 USB 드라이브를 부팅 가능하게 만들려면 다음 단계를 따르십시오.

  1. Download the customized Ubuntu ISO image.
    사용자 정의 된 Ubuntu ISO 이미지를 다운로드하십시오.

  2. To make the formatted USB drive bootable using UNetbootin on your AWS DeepRacer device, do the following:
    AWS DeepRacer 장치에서 UNetbootin을 사용하여 포맷 된 USB 드라이브를 부팅 가능하게 만들려면 다음을 수행하십시오.

    1. On your AWS DeepRacer compute module, run the following command to install and launch UNetbootin.
      AWS DeepRacer 컴퓨팅 모듈에서 다음 명령을 실행하여 UNetbootin을 설치하고 실행하십시오.   

sudo apt-get update; sudo apt-get install unetbootin
sudo unetbootin


On the UNetbootin window, do the following:

  1. Check the Disimage radio button.

  2. For the disk image, choose ISO from the drop-down menu.

  3. Open the file picker to choose the downloaded Ubuntu ISO file.

  4. For Type, choose USB Drive.

  5. For Drive, choose /dev/sda1.

  6. Choose OK.

Note

The customized Ubuntu image may be more recent than what's shown here. If so, use the most recent version of the Ubuntu image


사용자 정의 된 우분투 이미지는 여기에 표시된 것보다 더 최근의 것일 수 있습니다. 그렇다면 최신 버전의 Ubuntu 이미지를 사용하십시오.


If you get a /dev/sda1 not mounted alert message, choose OK to close the message, unplug the USB drive, replug the drive, and then follow the steps above create the Ubuntu ISO image


/ dev / sda1 not mounted 경고 메시지가 표시되면 OK를 선택하여 메시지를 닫고 USB 드라이브를 분리 한 다음 드라이브를 다시 연결하고 위의 단계를 수행하여 Ubuntu ISO 이미지를 만듭니다.


  1. To copy the factory restore files to the NTFS partition of the USB drive, follow the steps below:
    팩토리 복원 파일을 USB 드라이브의 NTFS 파티션에 복사하려면 다음 단계를 수행하십시오.

    1. Download the compressed factory restore package (~3.5GB).

    2. Unzip the downloaded package, and

    3. Copy the following uncompressed files to the second (NTFS) partition of the USB drive:

      • Image files (~9GB):

        • image_dlrc_1109_18WW45.5-2.bin

        • image_dlrc_1109_18WW45.5-2.bin.md5

      • Script files:

        • usb_flash.sh

        • set_hostname.py

        • dlrc_key.py



Partition and Make Bootable the USB Drive Using a MacOS Computer


Follow the instructions below to use a MacOS computer to prepare the USB drive for factory reset.


아래 지침에 따라 MacOS 컴퓨터를 사용하여 USB 드라이브를 공장 출하 상태로 초기화하십시오.


To partition the USB drive and make it bootable using a MacOS computer


USB 드라이브를 파티션하고 MacOS 컴퓨터를 사용하여 부팅 가능하게하려면


To format the USB drive, follow the steps below:


USB 드라이브를 포맷하려면 다음 단계를 따르십시오.


  1. Plug in the USB drive to your MacOS computer.

  2. Press command + space to open the search tool bar and then type Disk Utility.

    Alternatively, you can choose Finder->Applications->Utilties->Disk Utility to open the Disk Utility.

  3. Choose Generic Flash Disk on the left pane of Disk Utility. Then choose Erase on the top.




d. On the Erase "Generic Flash Disk Media"? page, choose Mac OS Extended (Journaled) for Format, choose GUID Partition Map for Scheme, and then choose Erase.


"일반 플래시 디스크 미디어"지우기? 페이지에서 Format의 Mac OS Extended (Journaled)를 선택하고 Scheme의 GUID Partition Map을 선택한 다음 Erase를 선택하십시오.



e. On the Disk Utility console, choose Partition from the menu on the top and then choose the + button on the Partition device … pop-up.


디스크 유틸리티 콘솔의 상단 메뉴에서 파티션을 선택한 다음 파티션 장치 ... 팝업에서 + 버튼을 선택하십시오.


f. To create the FAT32 partition of 2GB capacity, under Partition Information type Boot (or another name of your choosing) for Name, choose MS-DOS (FAT) for Format, set Size to 2 GB. (Do not choose Apply yet.)


2GB 용량의 FAT32 파티션을 만들려면 파티션 정보 유형에서 Boot (또는 선택한 다른 이름)에서 Name을 선택하고 Format에 MS-DOS (FAT)를 선택하고 Size를 2GB로 설정하십시오. 아직 적용을 선택하지 마십시오.





g. To create the partition for the updated AWS DeepRacer image, click or tap a point in the other (Untitled) partition, under Partition Information type Flash (or another name of your choosing) for Name, choose ExFat for Format, leave the remaining capacity (in GB) of the USB drive in Size. And then choose Apply.


업데이트 된 AWS DeepRacer 이미지의 파티션을 만들려면 다른 (제목 없음) 파티션의 한 지점을 클릭하거나, 파티션 정보 유형 Flash (또는 선택한 다른 이름)에서 Name을 클릭하고 ExFat for Format을 선택한 다음 남은 용량을 남겨 둡니다 GB 단위)의 USB 드라이브를 크기에 맞 춥니 다. 그런 다음 적용을 선택하십시오.




h. On the ensuing pop-up window, choose Partition to confirm creation of the specified new partitions.


계속되는 팝업 창에서 파티션을 선택하여 지정된 새 파티션 작성을 확인하십시오.




i. On the Disk Utility console, choose the BOOT partition on the left pane and then choose Info from the menu on the top. Make note of the BSD device node value. In this tutorial, the value is dsa1. You will need to supply this path when making the USB drive bootable from the FAT32 partition.


디스크 유틸리티 콘솔의 왼쪽 창에서 BOOT 파티션을 선택한 다음 맨 위에있는 메뉴에서 정보를 선택하십시오. BSD 장치 노드 값을 적어 두십시오. 이 자습서에서 값은 dsa1입니다. USB 드라이브를 FAT32 파티션에서 부팅 가능하게 만들 때이 경로를 제공해야합니다.



2. To make the USB drive bootable from the FAT32 partition, follow the steps below:
FAT32 파티션에서 USB 드라이브를 부팅 가능하게 만들려면 다음 단계를 따르십시오.

  1. Download the customized Ubuntu image.

  2. Go to https://unetbootin.github.io/ to download the UNetbootin software. Then start the UNetbootin console.

  3. On the UNetbootin console, do the following:

    1. Check the Disimage radio button.

    2. For the disk image, choose ISO from the drop-down menu.

    3. Open the file picker to choose the downloaded Ubuntu ISO file.

    4. For Type, choose USB Drive.

    5. For Drive, choose /dev/sda1.

    6. Choose OK.



Note


The customized Ubuntu image may be more recent than what's shown here. If so, use the most recent version of the Ubuntu image.


사용자 정의 된 우분투 이미지는 여기에 표시된 것보다 더 최근의 것일 수 있습니다. 그렇다면 최신 버전의 Ubuntu 이미지를 사용하십시오.


If you get a /dev/sda1 not mounted alert message, choose OK to close the message, unplug the USB drive, replug the drive, and then follow the steps above create the Ubuntu ISO image.


 / dev / sda1 not mounted 경고 메시지가 표시되면 OK를 선택하여 메시지를 닫고 USB 드라이브를 분리 한 다음 드라이브를 다시 연결하고 위의 단계를 수행하여 Ubuntu ISO 이미지를 만듭니다.


3. To copy the factory restore files to the NTFS partition of the USB drive, follow the steps below:


팩토리 복원 파일을 USB 드라이브의 NTFS 파티션에 복사하려면 다음 단계를 수행하십시오.

    1. Download the compressed factory restore package (~3.5GB).

    2. Unzip the downloaded package.

    3. Copy the following uncompressed files to the second (NTFS) partition of the USB drive:

      • Image files (~9GB):

        • image_dlrc_1109_18WW45.5-2.bin

        • image_dlrc_1109_18WW45.5-2.bin.md5

      • Script files:

        • usb_flash.sh

        • set_hostname.py

        • dlrc_key.py



Partition and Make Bootable the USB Drive Using a Windows Computer


Follow the instructions below to use a Windows computer to prepare the USB drive for factory reset.


아래의 지침에 따라 Windows 컴퓨터를 사용하여 USB 드라이브를 출고시 초기화하도록 준비하십시오.


To partition the USB drive and make it bootable using a Windows computer


Windows 컴퓨터를 사용하여 USB 드라이브를 파티션하고 부팅 가능하게하려면


1. To format the USB drive, follow the steps below:


USB 드라이브를 포맷하려면 다음 단계를 따르십시오.


a. Open the Windows command prompt, type diskmgmt.msc, and choose OK to launch the Windows Disk Management Console.


Windows 명령 프롬프트를 열고 diskmgmt.msc를 입력 한 다음 확인을 선택하여 Windows 디스크 관리 콘솔을 시작합니다.   




b. From the Disk Management console, choose the USB drive, for example, Disk 1 Removable (D:) below, delete all the partitions, and make the drive unallocated.


디스크 관리 콘솔에서 USB 드라이브 (예 : 아래의 디스크 1 이동식 (D :))를 선택하고 모든 파티션을 삭제 한 다음 드라이브 할당을 해제하십시오.



c. To create the FAT32 partition of 2GB capacity, right click the USB drive on the Disk Management console and choose New Simple Volume from the context menu.


2GB 용량의 FAT32 파티션을 만들려면 디스크 관리 콘솔에서 USB 드라이브를 마우스 오른쪽 단추로 클릭하고 컨텍스트 메뉴에서 새 단순 볼륨을 선택하십시오.





d. On the New Simple Volume Wizard, choose 2048 for Simple volume size in MB and then choose Next.


새 단순 볼륨 마법사에서 2048을 단순 볼륨 크기 (MB)로 선택한 다음 다음을 선택하십시오.




e. On the New Simple Volume Wizard page and under Format Partition, choose the Format this volume with the following settings. Then, choose FAT32 for File system, Default for Allocation unit size and any label (e.g., BOOT) for Volume label. Finally, choose Next to create the FAT32 partition.


새 단순 볼륨 마법사 페이지에서 파티션 포맷 아래에서 다음 설정으로이 볼륨 포맷을 선택하십시오. 그런 다음 파일 시스템에 대해 FAT32, 할당 단위 크기에 대해 기본값 및 볼륨 레이블에 대해 모든 레이블 (예 : BOOT)을 선택하십시오. 마지막으로 Next를 선택하여 FAT32 파티션을 만듭니다.




f. To create the NTFS partition of the remaining disk capacity, right click the USB drive on the Disk Management console and choose New Simple Volume from the context menu. Then, choose the Format this volume with the following settings option. Then choose NTFS for File system, Default for Allocation unit size, and a label (e.g, Flask) for Volume label. Finally, choose Next to start creating the NTFS partition.


디스크 용량의 NTFS 파티션을 만들려면 디스크 관리 콘솔에서 USB 드라이브를 마우스 오른쪽 단추로 클릭하고 컨텍스트 메뉴에서 새 단순 볼륨을 선택하십시오. 그런 다음이 볼륨을 다음 설정으로 포맷 옵션을 선택하십시오. 그런 다음 파일 시스템에 NTFS, 할당 단위 크기에 대해 기본값, 볼륨 레이블에 레이블 (예 : 플라스크)을 선택하십시오. 마지막으로 Next를 선택하여 NTFS 파티션 생성을 시작하십시오.





2. To make the USB drive bootable from the FAT32 partition, follow the steps below:


FAT32 파티션에서 USB 드라이브를 부팅 가능하게 만들려면 다음 단계를 따르십시오.

  1. Download the customized Ubuntu image.

  2. Go to https://unetbootin.github.io/ to download the UNetbootin software. Then start the UNetbootin console.

  3. On the UNetbootin console, do the following:

    1. Check the Disimage radio button.

    2. For the disk image, choose ISO from the drop-down menu.

    3. Open the file picker to choose the downloaded Ubuntu ISO file.

    4. For Type, choose USB Drive.

    5. For Drive, choose /dev/sda1.

    6. Choose OK.


Note


The customized Ubuntu image may be more recent than what's shown here. If so, use the most recent version of the Ubuntu image.


사용자 정의 된 우분투 이미지는 여기에 표시된 것보다 더 최근의 것일 수 있습니다. 그렇다면 최신 버전의 Ubuntu 이미지를 사용하십시오.



If you get a /dev/sda1 not mounted alert message, choose OK to close the message, unplug the USB drive, replug the drive, and then follow the steps above create the Ubuntu ISO image.


 / dev / sda1 not mounted 경고 메시지가 표시되면 OK를 선택하여 메시지를 닫고 USB 드라이브를 분리 한 다음 드라이브를 다시 연결하고 위의 단계를 수행하여 Ubuntu ISO 이미지를 만듭니다.


3. To copy the factory restore files to the NTFS partition of the USB drive, follow the steps below:


팩토리 복원 파일을 USB 드라이브의 NTFS 파티션에 복사하려면 다음 단계를 수행하십시오.

    1. Download the compressed factory restore package (~3.5GB).

    2. Unzip the downloaded package.

    3. Copy the following uncompressed files to the second (NTFS) partition of the USB drive:

      • Image files (~9GB):

        • image_dlrc_1109_18WW45.5-2.bin

        • image_dlrc_1109_18WW45.5-2.bin.md5

      • Script files:

        • usb_flash.sh

        • set_hostname.py

        • dlrc_key.py



Restore Your AWS DeepRacer Vehicle to Factory Settings



Follow the instructions below to restore your AWS DeepRacer vehicle to its factory settings. Make sure you have made proper preparations as described in Prepare for Factory Reset to Your AWS DeepRacer Vehicle.


아래 지침에 따라 AWS DeepRacer 차량을 공장 출하 상태로 복원하십시오. AWS DeepRacer 차량에 대한 공장 초기화 준비에 설명 된대로 적절한 준비를했는지 확인하십시오.


Note


After the factory reset, all data stored on your AWS DeepRacer vehicle will be erased.


초기화가 완료되면 AWS DeepRacer 차량에 저장된 모든 데이터가 지워집니다.


To restore your AWS DeepRacer vehicle to its factory settings


AWS DeepRacer 차량을 공장 출하 상태로 복원하려면


  1. Insert the prepared USB drive to your AWS DeepRacer compute module. Turn on the power and repeatedly press the ESC key to enter BIOS.
    준비된 USB 드라이브를 AWS DeepRacer 컴퓨팅 모듈에 삽입하십시오. 전원을 켜고 ESC 키를 반복해서 눌러 BIOS로 들어갑니다.

  2. From the BIOS window, choose Boot From File, then The option with USB in it, then EFI, then BOOT, and finally BOOTx64.EFI.
    BIOS 창에서 Boot from File을 선택한 다음 USB with The 옵션을 선택한 다음 EFI, BOOT 및 BOOTx64.EFI를 차례로 선택하십시오.

  3. After the compute module is booted, wait for the device reset to start automatically when the power LED indicator starts to flash and a terminal window is presented to display the progress. You don't provide any further user input at this stage.
    컴퓨팅 모듈이 부팅 된 후, 전원 LED 표시등이 깜박이기 시작하고 터미널 창이 표시되어 진행 상황을 표시 할 때 장치 재설정이 자동으로 시작될 때까지 기다립니다. 이 단계에서는 사용자 입력을 더 이상 제공하지 않습니다.

    If some error happens and the recovery fails, restart the procedure from Step 1. For detailed error messages, see the result.log file generated on the USB drive.
    일부 오류가 발생하여 복구가 실패하면 1 단계에서 절차를 다시 시작하십시오. 자세한 오류 메시지는 USB 드라이브에서 생성 된 result.log 파일을 참조하십시오.

  4. Wait for about 6 minutes for the power LED to stop flashing when the terminal closes automatically and the factory reset completes. The device then reboots itself automatically.
    단말기가 자동으로 닫히고 공장 초기화가 완료되면 전원 LED가 깜박임을 멈출 때까지 약 6 분간 기다리십시오. 그런 다음 장치가 자동으로 재부팅됩니다.

  5. After the device is restored to factory settings, disconnect the USB drive from the vehicle's compute module.
    장치가 공장 설정으로 복원 된 후 USB 드라이브를 차량의 컴퓨팅 모듈에서 분리하십시오.

After the factory reset, your AWS DeepRacer vehicle software is likely outdated. To update the vehicle software, go to the AWS DeepRacer device console and follow the instructions therein.


공장 초기화 후에는 AWS DeepRacer 차량 소프트웨어가 구식 일 수 있습니다. 차량 소프트웨어를 업데이트하려면 AWS DeepRacer 장치 콘솔로 이동하여 지침을 따르십시오.


'IoT > AWS DeepRacer' 카테고리의 다른 글

Troubleshooting  (0) 2019.01.01
Drive Your Vehicle  (0) 2018.12.31
Train and Evaluate Models  (0) 2018.12.30
Secure Calling AWS Services  (0) 2018.12.26
Get Started with AWS DeepRacer  (0) 2018.12.25
AWS DeepRacer - AWS account Setup  (0) 2018.12.24
What Is AWS DeepRacer?  (0) 2018.12.23