# maharshith1910/smart-product-pricing-model architecture

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

- Interactive diagram: https://gitdiagram.com/maharshith1910/smart-product-pricing-model
- Repository: https://github.com/maharshith1910/smart-product-pricing-model

## Overview

This repository is a product-price prediction submission. The principal workflow takes catalog text and image inputs, derives text, visual, and engineered numeric features, combines them for model training and prediction, then exports a submission. The README also documents dataset validation, SMAPE-based validation, and ensemble modeling; the sampled training-script excerpts show feature fusion, CNN features, neural models, and calibration. The excerpts are partial, so some documented model and workflow links are attributed to the README rather than inferred from unseen code.

Main entry points: [`src/baseline_train_prediction.py`](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py) (Training pipeline), [`dataset/datasets.py`](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/dataset/datasets.py) (Product datasets), [`src/utils.py`](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/utils.py) (Image downloader), [`test_out.csv`](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/test_out.csv) (Predictions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Data Inputs"]
  node_dataset["Product datasets<br/>[datasets.py]"]
  node_image_downloader["Image downloader<br/>[utils.py]"]
  node_dataset_check["Dataset checker"]
end

subgraph group_features["Feature Engineering"]
  node_text_features["Text features"]
  node_image_features["Image features"]
  node_numeric_features["Numeric features"]
  node_feature_fusion["Feature fusion"]
end

subgraph group_modeling["Training and Prediction"]
  node_pipeline["Training pipeline"]
  node_price_models["Price models"]
  node_calibration["Calibration"]
end

subgraph group_quality["Validation and Output"]
  node_smape_validation["SMAPE validation"]
  node_sample_format["Submission format"]
  node_predictions["Predictions<br/>[test_out.csv]"]
end

node_user(("Challenge user"))
node_image_service["Image hosts"]

node_user -->|"validates data"| node_dataset_check
node_dataset -->|"checks inputs"| node_dataset_check
node_user -->|"downloads images"| node_image_downloader
node_image_downloader -->|"fetches images"| node_image_service
node_dataset -->|"provides image links"| node_image_downloader
node_user -->|"runs training"| node_pipeline
node_dataset -.->|"supplies records"| node_pipeline
node_pipeline -->|"extracts text"| node_text_features
node_pipeline -->|"extracts images"| node_image_features
node_pipeline -->|"engineers features"| node_numeric_features
node_text_features -->|"combines features"| node_feature_fusion
node_image_features -->|"combines features"| node_feature_fusion
node_numeric_features -->|"combines features"| node_feature_fusion
node_pipeline -->|"trains models"| node_price_models
node_feature_fusion -->|"supplies features"| node_price_models
node_price_models -->|"evaluates predictions"| node_smape_validation
node_pipeline -->|"calibrates predictions"| node_calibration
node_price_models -.->|"provides predictions"| node_calibration
node_pipeline -->|"writes submission"| node_predictions
node_predictions -->|"matches format"| node_sample_format

click node_dataset "https://github.com/maharshith1910/smart-product-pricing-model/blob/main/dataset/datasets.py"
click node_image_downloader "https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/utils.py"
click node_dataset_check "https://github.com/maharshith1910/smart-product-pricing-model/blob/main/check_dataset_correctness.py"
click node_pipeline "https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py"
click node_text_features "https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py"
click node_image_features "https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py"
click node_numeric_features "https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py"
click node_feature_fusion "https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py"
click node_price_models "https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py"
click node_calibration "https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py"
click node_smape_validation "https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py"
click node_sample_format "https://github.com/maharshith1910/smart-product-pricing-model/blob/main/dataset/sample_test_out.csv"
click node_predictions "https://github.com/maharshith1910/smart-product-pricing-model/blob/main/test_out.csv"

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_dataset,node_image_downloader,node_dataset_check,node_user toneBlue
class node_text_features,node_image_features,node_numeric_features,node_feature_fusion toneAmber
class node_pipeline,node_price_models,node_calibration toneMint
class node_smape_validation,node_sample_format,node_predictions toneRose
class node_image_service toneIndigo
```

## Components

### Data Inputs

- [Product datasets](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/dataset/datasets.py): `dataset/datasets.py`
- [Image downloader](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/utils.py): `src/utils.py`
- [Dataset checker](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/check_dataset_correctness.py): `check_dataset_correctness.py`

### Feature Engineering

- [Text features](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py): `src/baseline_train_prediction.py`
- [Image features](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py): `src/baseline_train_prediction.py`
- [Numeric features](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py): `src/baseline_train_prediction.py`
- [Feature fusion](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py): `src/baseline_train_prediction.py`

### Training and Prediction

- [Training pipeline](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py): `src/baseline_train_prediction.py`
- [Price models](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py): `src/baseline_train_prediction.py`
- [Calibration](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py): `src/baseline_train_prediction.py`

### Validation and Output

- [SMAPE validation](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/src/baseline_train_prediction.py): `src/baseline_train_prediction.py`
- [Submission format](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/dataset/sample_test_out.csv): `dataset/sample_test_out.csv`
- [Predictions](https://github.com/maharshith1910/smart-product-pricing-model/blob/main/test_out.csv): `test_out.csv`

### Other components

- **Challenge user**
- **Image hosts**

## Connections

- Challenge user → Dataset checker: validates data (evidence: `README.md`)
- Product datasets → Dataset checker: checks inputs (evidence: `check_dataset_correctness.py`)
- Challenge user → Image downloader: downloads images (evidence: `src/utils.py`)
- Image downloader → Image hosts: fetches images (evidence: `src/utils.py`)
- Product datasets → Image downloader: provides image links (evidence: `src/utils.py`)
- Challenge user → Training pipeline: runs training (evidence: `README.md`)
- Product datasets → Training pipeline: supplies records
- Training pipeline → Text features: extracts text (evidence: `README.md`)
- Training pipeline → Image features: extracts images (evidence: `src/baseline_train_prediction.py`)
- Training pipeline → Numeric features: engineers features (evidence: `src/baseline_train_prediction.py`)
- Text features → Feature fusion: combines features (evidence: `src/baseline_train_prediction.py`)
- Image features → Feature fusion: combines features (evidence: `src/baseline_train_prediction.py`)
- Numeric features → Feature fusion: combines features (evidence: `src/baseline_train_prediction.py`)
- Training pipeline → Price models: trains models (evidence: `README.md`)
- Feature fusion → Price models: supplies features (evidence: `src/baseline_train_prediction.py`)
- Price models → SMAPE validation: evaluates predictions (evidence: `README.md`)
- Training pipeline → Calibration: calibrates predictions (evidence: `src/baseline_train_prediction.py`)
- Price models → Calibration: provides predictions (evidence: `src/baseline_train_prediction.py`)
- Training pipeline → Predictions: writes submission (evidence: `README.md`)
- Predictions → Submission format: matches format (evidence: `README.md`)
