# kkishore9891/jetson-nano-self-driving-car architecture

> Architecture diagram of the GitHub repository kkishore9891/jetson-nano-self-driving-car, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kkishore9891/jetson-nano-self-driving-car
- Repository: https://github.com/kkishore9891/jetson-nano-self-driving-car

## Overview

This repository implements a camera-guided, neural-network steering car across PC, Jetson Nano, and Arduino. The documented workflow is to collect camera images and steering targets while driving, prepare and balance the dataset on the PC, train a steering-angle model, then run it on the Jetson and send motor commands to the Arduino. The README supports the overall workflow; only PC data preparation and model training were excerpted, so links involving recording, deployment, and conversion are based on documentation rather than inspected implementation.

Main entry points: [`Jetson Nano/RECORD.py`](https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/Jetson%20Nano/RECORD.py) (Data Recorder), [`PC/DATA.py`](https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/PC/DATA.py) (Dataset Preparation), [`Jetson Nano/TEST.py`](https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/Jetson%20Nano/TEST.py) (Steering Inference), [`Jetson Nano/Images`](https://github.com/kkishore9891/jetson-nano-self-driving-car/tree/master/Jetson%20Nano/Images) (Captured Images)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Data Capture"]
  node_recorder["Data Recorder<br/>[RECORD.py]"]
  node_jetson_images[("Captured Images")]
  node_jetson_targets["Steering Targets<br/>[Target.txt]"]
end

subgraph group_training["PC Training"]
  node_pc_images[("Training Images")]
  node_pc_targets["Training Targets<br/>[Target.txt]"]
  node_dataset_prep["Dataset Preparation<br/>[DATA.py]"]
  node_datasets[("Prepared Datasets")]
  node_model_training["Model Training<br/>[MODEL.py]"]
  node_model_artifacts[("Model Artifacts")]
end

subgraph group_deployment["Jetson Deployment"]
  node_model_conversion["Model Conversion<br/>[CONVERT.py]"]
  node_jetson_model[("Jetson Models")]
  node_inference["Steering Inference<br/>[TEST.py]"]
end

subgraph group_vehicle["Vehicle Control"]
  node_arduino["Motor Firmware<br/>[Motor.ino]"]
  node_motors["Drive Motors"]
  node_steering_command["Motor Commands"]
end

node_driver(("Human Driver"))
node_camera["Web Camera"]

node_driver -->|"drives car"| node_recorder
node_camera -->|"provides frames"| node_recorder
node_recorder -->|"saves images"| node_jetson_images
node_recorder -->|"records targets"| node_jetson_targets
node_jetson_images -->|"copy images"| node_pc_images
node_jetson_targets -->|"copy targets"| node_pc_targets
node_pc_images -->|"loads images"| node_dataset_prep
node_pc_targets -->|"loads labels"| node_dataset_prep
node_dataset_prep -->|"saves datasets"| node_datasets
node_datasets -->|"loads balanced data"| node_model_training
node_model_training -->|"saves checkpoints"| node_model_artifacts
node_model_artifacts -.->|"converts model"| node_model_conversion
node_model_conversion -.->|"exports model"| node_jetson_model
node_camera -->|"provides live feed"| node_inference
node_jetson_model -.->|"predicts steering"| node_inference
node_inference -->|"outputs angle"| node_steering_command
node_steering_command -->|"sends serial command"| node_arduino
node_arduino -->|"controls speed"| node_motors

click node_recorder "https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/Jetson%20Nano/RECORD.py"
click node_jetson_images "https://github.com/kkishore9891/jetson-nano-self-driving-car/tree/master/Jetson%20Nano/Images"
click node_jetson_targets "https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/Jetson%20Nano/Target.txt"
click node_arduino "https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/Arduino%20Code/Motor/Motor.ino"
click node_pc_images "https://github.com/kkishore9891/jetson-nano-self-driving-car/tree/master/PC/Images"
click node_pc_targets "https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/PC/Target.txt"
click node_dataset_prep "https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/PC/DATA.py"
click node_datasets "https://github.com/kkishore9891/jetson-nano-self-driving-car/tree/master/PC/Datasets"
click node_model_training "https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/PC/MODEL.py"
click node_model_artifacts "https://github.com/kkishore9891/jetson-nano-self-driving-car/tree/master/PC/Models"
click node_model_conversion "https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/PC/CONVERT.py"
click node_jetson_model "https://github.com/kkishore9891/jetson-nano-self-driving-car/tree/master/Jetson%20Nano/Models"
click node_inference "https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/Jetson%20Nano/TEST.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_recorder,node_jetson_images,node_jetson_targets toneBlue
class node_pc_images,node_pc_targets,node_dataset_prep,node_datasets,node_model_training,node_model_artifacts toneAmber
class node_model_conversion,node_jetson_model,node_inference toneMint
class node_arduino,node_motors,node_steering_command toneRose
class node_driver,node_camera toneIndigo
```

## Components

### Data Capture

- [Data Recorder](https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/Jetson%20Nano/RECORD.py): `Jetson Nano/RECORD.py`
- [Captured Images](https://github.com/kkishore9891/jetson-nano-self-driving-car/tree/master/Jetson%20Nano/Images): `Jetson Nano/Images`
- [Steering Targets](https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/Jetson%20Nano/Target.txt): `Jetson Nano/Target.txt`

### PC Training

- [Training Images](https://github.com/kkishore9891/jetson-nano-self-driving-car/tree/master/PC/Images): `PC/Images`
- [Training Targets](https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/PC/Target.txt): `PC/Target.txt`
- [Dataset Preparation](https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/PC/DATA.py): `PC/DATA.py`
- [Prepared Datasets](https://github.com/kkishore9891/jetson-nano-self-driving-car/tree/master/PC/Datasets): `PC/Datasets`
- [Model Training](https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/PC/MODEL.py): `PC/MODEL.py`
- [Model Artifacts](https://github.com/kkishore9891/jetson-nano-self-driving-car/tree/master/PC/Models): `PC/Models`

### Jetson Deployment

- [Model Conversion](https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/PC/CONVERT.py): `PC/CONVERT.py`
- [Jetson Models](https://github.com/kkishore9891/jetson-nano-self-driving-car/tree/master/Jetson%20Nano/Models): `Jetson Nano/Models`
- [Steering Inference](https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/Jetson%20Nano/TEST.py): `Jetson Nano/TEST.py`

### Vehicle Control

- [Motor Firmware](https://github.com/kkishore9891/jetson-nano-self-driving-car/blob/master/Arduino%20Code/Motor/Motor.ino): `Arduino Code/Motor/Motor.ino`
- **Drive Motors**
- **Motor Commands**

### Other components

- **Human Driver**
- **Web Camera**

## Connections

- Human Driver → Data Recorder: drives car (evidence: `README.md`)
- Web Camera → Data Recorder: provides frames (evidence: `README.md`)
- Data Recorder → Captured Images: saves images (evidence: `README.md`)
- Data Recorder → Steering Targets: records targets (evidence: `README.md`)
- Captured Images → Training Images: copy images (evidence: `README.md`)
- Steering Targets → Training Targets: copy targets (evidence: `README.md`)
- Training Images → Dataset Preparation: loads images (evidence: `PC/DATA.py`)
- Training Targets → Dataset Preparation: loads labels (evidence: `PC/DATA.py`)
- Dataset Preparation → Prepared Datasets: saves datasets (evidence: `PC/DATA.py`)
- Prepared Datasets → Model Training: loads balanced data (evidence: `PC/MODEL.py`)
- Model Training → Model Artifacts: saves checkpoints (evidence: `PC/MODEL.py`)
- Model Artifacts → Model Conversion: converts model
- Model Conversion → Jetson Models: exports model
- Web Camera → Steering Inference: provides live feed (evidence: `README.md`)
- Jetson Models → Steering Inference: predicts steering
- Steering Inference → Motor Commands: outputs angle (evidence: `README.md`)
- Motor Commands → Motor Firmware: sends serial command (evidence: `README.md`)
- Motor Firmware → Drive Motors: controls speed (evidence: `README.md`)
