Use MATLAB to Train on Jetson Nano: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 15: | Zeile 15: | ||
|- | |- | ||
| 1 || Data Processing || | | 1 || Data Processing || | ||
* | *Image resizing: Ensures all input images match the network’s expected dimensions. Consistent sizing improves training stability and speeds up batch processing. | ||
* | |||
* | *Augmentation: Expands the dataset by applying random transformations—such as rotations, flips, translations, and color jitter—using imageDataAugmenter and augmentedImageDatastore. This reduces overfitting by exposing the model to varied examples without collecting new data. | ||
*Normalization: Scales pixel values to a common range (e.g., [0,1] or zero‐mean/unit‐variance). Normalized inputs ensure faster convergence and prevent numeric instability during training. | |||
|| | || | ||
|- | |- | ||
| Zeile 49: | Zeile 51: | ||
|- | |- | ||
| 5 || Generate c/c++ || || | | 5 || Generate c/c++ || Check for errors and Generated folders || | ||
[[Datei:Generated Cuda Code.png|mini]] | [[Datei:Generated Cuda Code.png|mini]] | ||
Version vom 2. Juni 2025, 15:48 Uhr
Setup
Overview
To train the AI using MATLAB, I will write a script on MATLAB and then use GPU Coder to flash the function/model on the JetRacer. So all the debugging process will be on MATLAB.
Key Concepts
- Deep Learning with MATLAB
- The fundamental of training an AI system is called deep learning. MATLAB provides a variety of helpful toolboxes, pre-trained networks, and tools to process data into useful input for an AI [1].
- The training can be stored as a model, usually in a .MAT format, which can be reused. Hence, we do not have to train a model every time we want to use it.
- Data preprocessing—including image resizing, augmentation, and normalization—is handled with MATLAB functions such as imageDatastore and augmentedImageDatastore.
| # | Description | Pictures | |
|---|---|---|---|
| 1 | Data Processing |
|
|
| 2 | Model training | ||
| 3 | Output |
- Gpu Coder
- GPU Coder generates optimized CUDA® C++ from your MATLAB® algorithms, unlocking the parallel compute power of the Jetson GPU for real-time processing on your JetRacer and improve 40 times the performance on the jetracer [2][3].
- Helps target GPUs for automotive applications.
Result
generated files



