Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vision2Value

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.

Key ideas (different from typical baselines)

  • Brand-first signals: Extract a brand token from the start of catalog_content and 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.

Repository layout

  • 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/: Place train.csv and test.csv here (samples included).

Setup

Option A (full features):

  1. Use Python 3.10–3.12 for best binary wheel coverage.
  2. Install dependencies:
python -m pip install -r requirements.txt

Option B (no dependencies; quick check):

python src/heuristic_generate.py

This writes test_out.csv using the sample data.

Running Locally (Web Interface)

To run the project with the web interface on localhost:

  1. Ensure you have installed the required dependencies:
python -m pip install -r requirements.txt
  1. Run the FastAPI application:
python src/app.py
  1. Open your browser and navigate to http://127.0.0.1:8000 to access the web interface. You can upload CSV files for prediction directly from the UI.

Usage (model pipeline)

  • 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.csv

Output format always matches:

sample_id,price
...,...

Evaluation

  • Metric: SMAPE. We report validation SMAPE during training when --val_size > 0.
  • All predictions are clipped to positive values.

Constraints and Fair Play

  • 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.

License

  • MIT (see LICENSE).

About

A multimodal price prediction model featuring a sleek local web interface. Merges brand signals, robust numeric cues, and image features to provide accurate price predictions for the Smart Product Pricing Challenge.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages