# ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying architecture

> Architecture diagram of the GitHub repository ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying
- Repository: https://github.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying

## Overview

This repository supports a paddy-leaf disease model workflow: prepare the three-class image dataset, train a classifier, then quantize and package it for Arduino use. The README specifically documents dataset extraction through the notebook; the sampled Python source documents model training and conversion. The Arduino sketch is present, but its runtime behavior and connection to the generated header were not sampled, so those links are left unspecified.

Main entry points: [`convert_to_tflite.py`](https://github.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying/blob/main/convert_to_tflite.py) (TFLite converter), [`train_model.py`](https://github.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying/blob/main/train_model.py) (Model trainer), [`train_model.ipynb`](https://github.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying/blob/main/train_model.ipynb) (Training notebook), [`model_data.h`](https://github.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying/blob/main/model_data.h) (Model C header)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Dataset preparation"]
  node_notebook["Training notebook<br/>[train_model.ipynb]"]
  node_dataset["Class image dataset"]
end

subgraph group_ml["Model training"]
  node_trainer["Model trainer<br/>[train_model.py]"]
  node_keras_model["Keras model"]
end

subgraph group_deploy["Embedded deployment"]
  node_converter["TFLite converter"]
  node_tflite["Quantized model"]
  node_header["Model C header<br/>[model_data.h]"]
end

subgraph group_robot["Robot runtime"]
  node_sketch["Plant robot sketch<br/>[plant_robot.ino]"]
end

node_user(("Dataset provider"))

node_user -->|"provides ZIP"| node_notebook
node_notebook -->|"extracts classes"| node_dataset
node_trainer -->|"loads images"| node_dataset
node_trainer -->|"saves model"| node_keras_model
node_converter -->|"loads model"| node_keras_model
node_converter -->|"samples images"| node_dataset
node_converter -->|"writes model"| node_tflite
node_converter -->|"writes array"| node_header

click node_notebook "https://github.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying/blob/main/train_model.ipynb"
click node_trainer "https://github.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying/blob/main/train_model.py"
click node_converter "https://github.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying/blob/main/convert_to_tflite.py"
click node_header "https://github.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying/blob/main/model_data.h"
click node_sketch "https://github.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying/blob/main/plant_robot.ino"

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_notebook,node_dataset toneBlue
class node_trainer,node_keras_model toneAmber
class node_converter,node_tflite,node_header toneMint
class node_sketch toneRose
class node_user toneIndigo
```

## Components

### Dataset preparation

- [Training notebook](https://github.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying/blob/main/train_model.ipynb): `train_model.ipynb`
- **Class image dataset**

### Model training

- [Model trainer](https://github.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying/blob/main/train_model.py): `train_model.py`
- **Keras model**

### Embedded deployment

- [TFLite converter](https://github.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying/blob/main/convert_to_tflite.py): `convert_to_tflite.py`
- **Quantized model**
- [Model C header](https://github.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying/blob/main/model_data.h): `model_data.h`

### Robot runtime

- [Plant robot sketch](https://github.com/ajaybhashaveni/robotic-arm-sprinkler-for-pesticide-spraying/blob/main/plant_robot.ino): `plant_robot.ino`

### Other components

- **Dataset provider**

## Connections

- Dataset provider → Training notebook: provides ZIP
- Training notebook → Class image dataset: extracts classes
- Model trainer → Class image dataset: loads images
- Model trainer → Keras model: saves model
- TFLite converter → Keras model: loads model
- TFLite converter → Class image dataset: samples images
- TFLite converter → Quantized model: writes model
- TFLite converter → Model C header: writes array
