Tutorials6 min read

How AI Fashion Trend Forecasting Works: A Developer Guide

How ML forecasts fashion trends: tag garment attributes in images, turn them into time series, forecast with Prophet and add search signals. Code and papers.

By AI Agents DirectoryLast checked
Blue 3D letters spelling AI on a dotted surface crossed by dark curved lines

Fashion trend forecasting with machine learning is less mysterious than vendor pages make it sound. In the research literature, nearly every system does the same three things: it turns images into structured attributes (sleeve length, colour, pattern), it counts how often those attributes appear over time, and it forecasts those counts forward, sometimes with outside signals such as search interest. This guide walks through that pipeline with code from official docs and points to the papers that tested each idea. It does not cite market sizes or vendor accuracy claims, because none of them could be traced to a primary source.

The signals research systems actually use

SignalWhat it capturesPaper that used it
Product imagesVisual styles of items people boughtFashion Forward (Al-Halah, Stiefelhagen, Grauman, ICCV 2017)
Social media photosFine-grained garment elements worn by specific user groupsKERN and the FIT dataset (Ma et al., ICMR 2020)
Street photos across citiesAttribute trends over time and place, plus local eventsGeoStyle (Mall et al., ICCV 2019)
Search interestOutside demand signal for items with no sales historyGTM-Transformer and VISUELLE (Skenderi et al.)

A few findings are worth knowing before you build anything:

  • Fashion Forward found styles in fashion images without labels, then forecast how popular each style would become. It was tested on about 80,000 products sold on Amazon over six years. The authors report that visual features helped forecasting far more than product text or metadata did.
  • KERN argues that earlier work looked only at a handful of very seasonal elements. Its authors built FIT, a large dataset from Instagram that records garment elements as time series together with user information. They then fed fashion domain knowledge into a recurrent network.
  • GeoStyle processed large sets of street photos to forecast long-term attribute trends and to find events tied to a place and time that changed what people wore.

Step 1: tag garment attributes in images

You need attributes before you can count them. The cheapest starting point is zero-shot classification. Hugging Face describes it as sorting images into categories that the model never saw labelled examples of. Models like CLIP learn matched image and text representations, so your labels can be plain-language descriptions. The documented pipeline looks like this, with fashion labels swapped in:

from transformers import pipeline
from PIL import Image

detector = pipeline(model="openai/clip-vit-large-patch14",
                    task="zero-shot-image-classification")

image = Image.open("street_photo_0001.jpg")
labels = ["a photo of a midi skirt", "a photo of a mini skirt",
          "a photo of wide-leg trousers", "a photo of skinny jeans"]
print(detector(image, candidate_labels=labels))

The pipeline returns a score for each label. Run one prompt set per attribute group (silhouette, colour, pattern) rather than one huge list. The model picks the best match among the options you give it, so mixing unrelated attributes gives meaningless scores.

Two tools help here:

  • Before you trust the tags, hand-label a few hundred images and measure agreement. CVAT is an open-source annotation tool for images, video, audio and 3D data. Its README says you can connect your own models to pre-label images, which speeds up the review.
  • To find styles nobody has named yet, the way Fashion Forward did, store image embeddings and group them. Faiss is Meta’s library for similarity search and clustering of dense vectors. It is written in C++, comes with Python wrappers, and some algorithms run on GPU.

Step 2: turn tags into time series

Forecasting models need a number per period. A simple approach is to take the share of images in each month that carry an attribute. Use share, not raw counts, so that growth in your photo collection does not look like a trend. Keep one series per attribute, and per market or customer segment if you have enough data. KERN’s focus on specific user groups points the same way.

import pandas as pd

# tags.csv: one row per image, with taken_at (date) and attribute columns
tags = pd.read_csv("tags.csv", parse_dates=["taken_at"])
tags["month"] = tags["taken_at"].dt.to_period("M").dt.to_timestamp()

series = (tags.groupby("month")["is_midi_skirt"].mean()
              .reset_index()
              .rename(columns={"month": "ds", "is_midi_skirt": "y"}))

The ds/y column names are not arbitrary. They are what Prophet expects.

Step 3: forecast each attribute

Prophet is a forecasting library for Python and R. It follows the scikit-learn style of creating a model, calling fit, then calling predict. Its input is a dataframe with a date column ds and a numeric column y. For monthly data, the docs advise forecasting only at monthly steps by passing a frequency such as 'MS' (month start) to make_future_dataframe:

from prophet import Prophet

m = Prophet()
m.fit(series)
future = m.make_future_dataframe(periods=12, freq="MS")
forecast = m.predict(future)
print(forecast[["ds", "yhat", "yhat_lower", "yhat_upper"]].tail(12))

yhat is the forecast. yhat_lower and yhat_upper are the uncertainty band. In practice, the band is often more useful than the point estimate: a rising attribute with a narrow band is a stronger buying signal than one with a wide band. m.plot_components(forecast) breaks the forecast into trend and seasonal parts. That is a quick way to separate a real long-term rise from the usual spring bump.

If you have hundreds of attribute series, fitting and comparing models one at a time gets slow. AutoGluon automates model training on tabular and time-series data in a few lines through its TimeSeriesPredictor. Its README also lists the team’s Chronos papers on pretrained forecasting models.

Step 4: add search interest, carefully

Search data can add an outside signal, especially for new items. The GTM-Transformer paper predicts sales for brand-new fashion products, which have no sales history. It encodes Google Trends series and combines them with the item’s image and metadata, and it forecasts the whole horizon in one pass rather than step by step. The authors also released VISUELLE: 5,577 real products sold from 2016 to 2019 by Nunalie, an Italian fast-fashion company, with images, metadata, sales and matching Trends series. The code and dataset link are on GitHub under an MIT licence. It is the most practical public benchmark if you want to test your own model.

Read Google’s FAQ on Trends data before you use the numbers:

  • Trends uses a sample of Google searches, not all of them.
  • Each point is divided by total searches for that place and time, then scaled from 0 to 100. Values show relative interest, not volume.
  • Low-volume terms show as 0, and Google adds random noise for privacy. Spikes on niche queries can therefore be artefacts.
  • Google says Trends is not a poll and should be one input among several.

In practice, that means you should use broad, high-volume terms such as “midi skirt”, not a specific product name. Compare against stable reference terms, and add Trends as an extra regressor or feature, never as the target.

Where this breaks

  • Short histories. Many attributes have only a few seasons of data, so trend and seasonality are hard to tell apart. Back-test on held-out seasons before acting on a forecast.
  • Tagging errors become forecast errors. If the classifier confuses two silhouettes, their series blur together. Validate tags first.
  • Sample bias. Instagram users, Amazon buyers and street photos each show a different slice of what people wear. Instagram posts in FIT, Amazon sales in Fashion Forward and GeoStyle’s street imagery describe different groups of people, so check that your source matches the customers you sell to.
  • Forecasts are not decisions. These models tell you which attributes are rising. Buying quantities still depend on margins, lead times and stock, which none of the papers above model.

For more open-source tools in this space, browse the data and research hub.

#Fashion#Trend forecasting#Time series#Computer vision#Prophet
AI

Written by AI Agents Directory

Editorial team

Facts in this guide are checked against official documentation and repositories, which are linked in the article.