Crawl: the most reliable web crawler APISee what’s new
Zenrows
Talk to sales Start free

Computer vision training data

Computer vision training data is a set of images paired with labels (categories, attributes, captions or alt text) that a vision or multimodal model learns from. Zenrows reads the pages holding the images, returns image URLs, alt text and label fields as JSON, then downloads each file, so every image keeps its label and source URL.

Updated

Sample output: one labeled image
{
  "page_url": "https://www.example-shop.com/p/trail-runner-gtx",
  "image_url": "https://cdn.example-shop.com/img/trail-runner-gtx-side-1600.jpg",
  "alt": "Trail running shoe, side view, grey with orange sole",
  "labels": {
    "title": "Trail Runner GTX",
    "category": ["Footwear", "Running", "Trail"],
    "color": "grey/orange"
  },
  "file": {
    "sha256": "a91f0c3e5b7d",
    "mime": "image/jpeg",
    "width": 1600,
    "height": 1600,
    "bytes": 214332
  },
  "fetched_at": "2026-10-17T08:12:40Z"
}
Illustrative. Zenrows returns image URL, alt text, labels and file; you compute hash and dimensions.

What vision teams collect from the web

The value is the label beside each image: product category, listing attributes, an editor's caption.

JobData you collectTypical sources
Product recognition Product photos with category, brand, attributes Amazon, Walmart, Etsy and retailer product pages
Fashion and visual search Item images with color, material, style Zara, H&M and Myntra product pages
Interiors and real estate Room photos with listing attributes Zillow and Idealista listing galleries
Vehicle recognition Car photos with make, model, year, trim Autotrader, Cars.com and dealer inventory pages
Image-caption pairs Images with alt text and captions Wikimedia Commons, museum collections, news photo captions
Documents and labels Labels, packaging, forms, receipts for OCR Product label pages, public form libraries, filings

Why image scraping breaks

Image pipelines fail quietly: placeholder thumbnails or unlabeled files still fill a folder, then show up weeks later as a weak model.

What it looks like

Placeholder GIFs and data-src attributes

How Zenrows handles it

A browser render that waits for an element, or scrolls with page actions, loads the gallery

How to collect computer vision training data

  1. Find the pages: Crawl a category or gallery with an include pattern like /p/.
  2. Read images and labels together: Fetch with CSS selectors returns image URLs, alt text and labels in one JSON.
  3. Download the files: Fetch on an image URL returns the file itself.
  4. Hash, dedupe and record provenance: name files by content hash, drop repeats, store page URL, label and licence note.
# pip install requests
import hashlib, json, os
import requests

API, KEY = "https://api.zenrows.com/v1/", "YOUR_ZENROWS_API_KEY"
selectors = {
    "title": "h1",
    "category": "nav.breadcrumb a",
    "images": "img.product-image @src",
    "alts": "img.product-image @alt",
}

# 1. Image URLs, alt text and labels from one product page
page = requests.get(API, timeout=120, params={
    "apikey": KEY, "url": PRODUCT_URL, "mode": "auto",  # Adaptive Stealth Mode
    "css_extractor": json.dumps(selectors),
}).json()

as_list = lambda v: v if isinstance(v, list) else [v]
os.makedirs("images", exist_ok=True)

# 2. Download each file through Fetch and name it by content hash
for src, alt in zip(as_list(page["images"]), as_list(page["alts"])):
    img = requests.get(API, params={"apikey": KEY, "url": src}, timeout=120)
    if not img.ok:
        continue
    digest = hashlib.sha256(img.content).hexdigest()
    ext = img.headers.get("Content-Type", "image/jpeg").split("/")[-1]
    with open(f"images/{digest}.{ext}", "wb") as f:
        f.write(img.content)
    print(json.dumps({"page": PRODUCT_URL, "image_url": src, "alt": alt,
                      "title": page["title"], "sha256": digest}))

What success looks like

MeasureWhat good looks likeHow to check it
Label coverage Every image has labels and source URL Empty title, category or alt per source
Resolution Files meet your minimum size Share below minimum after download
Duplicate rate Repeats removed before training Exact, then perceptual hashes per batch
Class balance Each class has the images the plan needs Images per label after each run
Download success Nearly every found image URL becomes a file URLs extracted against files written per run
Images kept per run The share surviving dedup and quality filters holds steady as sources grow Kept after filtering over downloaded, per run

Computer vision training data FAQ

  • Labeled images a model learns from: a class like "running shoe", attributes like color, bounding boxes, a scene caption. Many web images already sit beside human-written titles, breadcrumb categories, alt text and captions.

  • Crawl lists the pages; Fetch with CSS selectors returns img @src, img @alt and label fields; a second Fetch per image URL returns the file. Store each file with its page URL and labels.

  • Pair each image with its alt attribute, figcaption, or product title and description, selected in the same request so pairs stay aligned. Drop empty or generic alt text, like "image" or a file name.

  • Full-size URLs often sit in a zoom attribute, a srcset list or a wrapping link, not src. Select that with CSS, and wait for an element in a browser render when JavaScript loads the gallery.

  • Images are usually copyrighted, and photos of people can be personal or biometric data under laws like the GDPR. Teams favor openly licensed sources, record licence and source URL per file, exclude or blur unneeded faces, follow site terms, and ask legal before training.

  • Use the page's labels: breadcrumb category, title, color and size on product pages; room types or vehicle trims in galleries. Map them to your classes with a lookup table; send only failures to annotators. Keep original fields per file to relabel without recollecting.

Turn the live web into usable data.