# pedros2705/ino544-2026i--carros-deportivos-japoneses- architecture

> Architecture diagram of the GitHub repository pedros2705/ino544-2026i--carros-deportivos-japoneses-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-
- Repository: https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-

## Overview

DO YOU TENSORFLOW? is a JDM-car image classifier with a browser interface, FastAPI inference endpoints, and a separate PyTorch training script. Users can upload an image or analyze live camera frames; the API passes decoded image bytes to the classifier and returns a label, probabilities, and vehicle specifications. Uploaded predictions and submitted reference images are saved with JSON metadata. Training code documents a dataset-to-model workflow, but its dataset is not in the tree. Edges reflect the shown calls; the HTML’s wiring and any ONNX runtime are not verified.

Main entry points: [`app.py`](https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/app.py) (FastAPI Routes), [`static/index.html`](https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/static/index.html) (JDM Web Page), [`database/connection.py`](https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/database/connection.py) (Image and Record Store), [`static/script.js`](https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/static/script.js) (Image Upload)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Browser Interface"]
  node_browser["JDM Web Page<br/>[index.html]"]
  node_upload["Image Upload<br/>[script.js]"]
  node_camera["Live Camera<br/>[camara.js]"]
end

subgraph group_service["Inference Service"]
  node_api["FastAPI Routes<br/>[app.py]"]
end

subgraph group_model["Model Lifecycle"]
  node_classifier["Image Classifier<br/>[utils.py]"]
  node_training["Model Training<br/>[entrenar_ia.py]"]
  node_weights["Model Weights<br/>[modelo_jdm_v2.pt]"]
end

subgraph group_data["Reference Storage"]
  node_reference["Reference Submission<br/>[app.py]"]
  node_store[("Image and Record Store<br/>[connection.py]")]
  node_records["JSON Records<br/>[records.json]"]
end

node_user(("User"))

node_user -->|"uses"| node_browser
node_browser -.->|"loads"| node_upload
node_browser -.->|"loads"| node_camera
node_upload -->|"posts image"| node_api
node_camera -->|"posts frames"| node_api
node_api -->|"predicts with"| node_classifier
node_classifier -.->|"loads"| node_weights
node_training -->|"saves"| node_weights
node_api -->|"saves predictions"| node_store
node_user -.->|"submits reference"| node_reference
node_reference -->|"saves image"| node_store
node_store -->|"updates"| node_records

click node_browser "https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/static/index.html"
click node_upload "https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/static/script.js"
click node_camera "https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/static/camara.js"
click node_api "https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/app.py"
click node_classifier "https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/utils.py"
click node_training "https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/entrenar_ia.py"
click node_weights "https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/modelo_jdm_v2.pt"
click node_reference "https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/app.py"
click node_store "https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/database/connection.py"
click node_records "https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/database/records.json"

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_browser,node_upload,node_camera,node_user toneBlue
class node_api toneAmber
class node_classifier,node_training,node_weights toneMint
class node_reference,node_store,node_records toneRose
```

## Components

### Browser Interface

- [JDM Web Page](https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/static/index.html): `static/index.html`
- [Image Upload](https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/static/script.js): `static/script.js`
- [Live Camera](https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/static/camara.js): `static/camara.js`

### Inference Service

- [FastAPI Routes](https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/app.py): `app.py`

### Model Lifecycle

- [Image Classifier](https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/utils.py): `utils.py`
- [Model Training](https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/entrenar_ia.py): `entrenar_ia.py`
- [Model Weights](https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/modelo_jdm_v2.pt): `modelo_jdm_v2.pt`

### Reference Storage

- [Reference Submission](https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/app.py): `app.py`
- [Image and Record Store](https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/database/connection.py): `database/connection.py`
- [JSON Records](https://github.com/pedros2705/ino544-2026i--carros-deportivos-japoneses-/blob/main/database/records.json): `database/records.json`

### Other components

- **User**

## Connections

- User → JDM Web Page: uses
- JDM Web Page → Image Upload: loads
- JDM Web Page → Live Camera: loads
- Image Upload → FastAPI Routes: posts image (evidence: `static/script.js`)
- Live Camera → FastAPI Routes: posts frames (evidence: `static/camara.js`)
- FastAPI Routes → Image Classifier: predicts with (evidence: `app.py`)
- Image Classifier → Model Weights: loads
- Model Training → Model Weights: saves (evidence: `entrenar_ia.py`)
- FastAPI Routes → Image and Record Store: saves predictions (evidence: `app.py`)
- User → Reference Submission: submits reference
- Reference Submission → Image and Record Store: saves image (evidence: `app.py`)
- Image and Record Store → JSON Records: updates (evidence: `database/connection.py`)
