CLIP-inspired pipeline combining image and time-series encoders to predict sales patterns for new products before launch, using visual similarity to existing products with known sales history.
Developed a CLIP-inspired multimodal contrastive learning pipeline to predict sales patterns for new fashion products before market launch. The system learns joint embeddings from product design images and historical sales time series, enabling demand forecasting for products with no sales history.
How it works: For existing products, we have both product images and historical sales time series. The system learns to map both modalities into a shared embedding space using contrastive learning. At inference, a new product's design image is encoded and we find the nearest time series embeddings in this shared space - those sales patterns become the forecast for the new product.
Why contrastive learning? Traditional forecasting requires historical sales data, which new products lack. By aligning image and time series representations in a shared space during training, we can bypass the image encoder at inference and directly retrieve similar sales patterns based on visual similarity.
Fashion brands needed to forecast demand for new products before launch to plan inventory and production. Challenges included:
Built a CLIP-style contrastive learning pipeline with two encoders:
Training Phase: Contrastive Learning
The training phase uses dual encoders to map product images and sales time series into a shared 512-dimensional embedding space. The contrastive loss (InfoNCE) pulls matching pairs (I₁, T₁) together while pushing non-matching pairs apart, learning the relationship between visual design and sales patterns.
Inference Phase: New Product Forecasting
At inference, a new product's image is encoded into the same embedding space. Cosine similarity search finds the nearest time series embeddings from the pre-computed bank. The Top-K most similar sales patterns are retrieved and aggregated to generate the final demand forecast.
Dual Encoder Architecture:
Key Implementation Details:
Deep Learning: PyTorch, Vision Transformers, CNN architectures
Contrastive Learning: CLIP-style architecture, InfoNCE loss
Time Series: Custom temporal encoders
Data: Product design images, sales time series
This approach solved the fundamental cold-start problem in new product forecasting. Traditional methods require months of sales history before generating reliable forecasts. By learning the relationship between visual design and sales patterns, the system enabled demand planning from the moment a product design was finalized, significantly reducing inventory risk for new product launches.