Repository: https://github.com/SaurabhForge/Vision2Value
An MIT-licensed, multimodal price prediction baseline tailored for the Smart Product Pricing Challenge. It trains on product catalog_content and optionally product images to predict price and exports predictions that match the required test_out.csv schema. This repository contains the core machine learning pipeline as well as a local web interface for easy inference.
- Brand-first signals: Extract a brand token from the start of
catalog_contentand blend its signal with text TF‑IDF features. - Light, deterministic image features: Optional color-histogram image descriptors (no external models) to stay simple and reproducible.
- Robust numeric cues: Parse IPQ, storage sizes (GB/TB), screen inches, and basic units; standardize and feed into a regularized regressor.
- SMAPE reporting: Built‑in validation split and SMAPE metric for consistent leaderboard‑aligned evaluation.
src/utils.py: Image download, preprocessing, and lightweight text feature helpers.src/vision2value.py: Training/inference CLI (TF‑IDF + RidgeCV, optional image histograms).src/heuristic_generate.py: Zero‑dependency fallback that generates valid predictions using brand medians and simple rules.dataset/: Placetrain.csvandtest.csvhere (samples included).
Option A (full features):
- Use Python 3.10–3.12 for best binary wheel coverage.
- Install dependencies:
python -m pip install -r requirements.txtOption B (no dependencies; quick check):
python src/heuristic_generate.pyThis writes test_out.csv using the sample data.
To run the project with the web interface on localhost:
- Ensure you have installed the required dependencies:
python -m pip install -r requirements.txt- Run the FastAPI application:
python src/app.py- Open your browser and navigate to
http://127.0.0.1:8000to access the web interface. You can upload CSV files for prediction directly from the UI.
- Train with validation and predict:
python src/vision2value.py --train dataset/train.csv --test dataset/test.csv --out test_out.csv --val_size 0.1- Enable image features (downloads images defined by
image_link):
python src/vision2value.py --use_images --train dataset/train.csv --test dataset/test.csv --out test_out.csvOutput format always matches:
sample_id,price
...,...
- Metric: SMAPE. We report validation SMAPE during training when
--val_size > 0. - All predictions are clipped to positive values.
- No external price lookups, scraping, or augmentations. The pipeline uses only provided fields.
- Images are downloaded solely to compute simple color histograms; no internet price data is used.
- MIT (see
LICENSE).