# saravanan0712/convix-ir architecture

> Architecture diagram of the GitHub repository saravanan0712/convix-ir, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/saravanan0712/convix-ir
- Repository: https://github.com/saravanan0712/convix-ir

## Overview

ConViX-IR is a peach-freshness research project. Its implemented workflow covers dataset integrity and leakage auditing, then a ConvNeXt-Tiny baseline for training and evaluation; trained checkpoints can be used for single-image inference or the Gradio upload interface. The README also describes iterative CNN–ViT integration and calibration as planned work, not implemented functionality, so those are not mapped as runtime components. The source excerpts show the UI-to-inference and inference-to-model relationships; other internal training details are kept at the baseline-module level.

Main entry points: [`src/phase2/predict_image.py`](https://github.com/saravanan0712/convix-ir/blob/main/src/phase2/predict_image.py) (Image Inference), [`src/phase2/app.py`](https://github.com/saravanan0712/convix-ir/blob/main/src/phase2/app.py) (Upload Interface), [`src/phase1/phase1_dataset_audit.py`](https://github.com/saravanan0712/convix-ir/blob/main/src/phase1/phase1_dataset_audit.py) (Integrity Audit), [`src/phase2/convnext_baseline.py`](https://github.com/saravanan0712/convix-ir/blob/main/src/phase2/convnext_baseline.py) (Train and Evaluate)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_audit["Dataset Audit"]
  node_audit_process["Integrity Audit"]
end

subgraph group_baseline["CNN Baseline"]
  node_training["Train and Evaluate"]
  node_model["ConvNeXt Baseline"]
end

subgraph group_inference["Inference"]
  node_image_inference["Image Inference<br/>[predict_image.py]"]
  node_upload_ui["Upload Interface<br/>[app.py]"]
end

node_dataset[("Peach Dataset")]
node_researcher(("Researcher"))

node_dataset -->|"audits"| node_audit_process
node_researcher -->|"uploads image"| node_upload_ui
node_upload_ui -->|"calls inference"| node_image_inference
node_image_inference -->|"loads and predicts"| node_model
node_researcher -->|"runs baseline"| node_training

click node_audit_process "https://github.com/saravanan0712/convix-ir/blob/main/src/phase1/phase1_dataset_audit.py"
click node_training "https://github.com/saravanan0712/convix-ir/blob/main/src/phase2/convnext_baseline.py"
click node_model "https://github.com/saravanan0712/convix-ir/blob/main/src/phase2/convnext_baseline.py"
click node_image_inference "https://github.com/saravanan0712/convix-ir/blob/main/src/phase2/predict_image.py"
click node_upload_ui "https://github.com/saravanan0712/convix-ir/blob/main/src/phase2/app.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_audit_process toneBlue
class node_training,node_model,node_dataset toneAmber
class node_image_inference,node_upload_ui toneMint
class node_researcher toneIndigo
```

## Components

### Dataset Audit

- [Integrity Audit](https://github.com/saravanan0712/convix-ir/blob/main/src/phase1/phase1_dataset_audit.py): `src/phase1/phase1_dataset_audit.py`

### CNN Baseline

- [Train and Evaluate](https://github.com/saravanan0712/convix-ir/blob/main/src/phase2/convnext_baseline.py): `src/phase2/convnext_baseline.py`
- [ConvNeXt Baseline](https://github.com/saravanan0712/convix-ir/blob/main/src/phase2/convnext_baseline.py): `src/phase2/convnext_baseline.py`

### Inference

- [Image Inference](https://github.com/saravanan0712/convix-ir/blob/main/src/phase2/predict_image.py): `src/phase2/predict_image.py`
- [Upload Interface](https://github.com/saravanan0712/convix-ir/blob/main/src/phase2/app.py): `src/phase2/app.py`

### Other components

- **Peach Dataset**
- **Researcher**

## Connections

- Peach Dataset → Integrity Audit: audits (evidence: `README.md`)
- Researcher → Upload Interface: uploads image (evidence: `src/phase2/app.py`)
- Upload Interface → Image Inference: calls inference (evidence: `src/phase2/app.py`)
- Image Inference → ConvNeXt Baseline: loads and predicts (evidence: `src/phase2/predict_image.py`)
- Researcher → Train and Evaluate: runs baseline (evidence: `README.md`)
