Wikimedia Enterprise/Multimedia Metadata Dataset
This page in a nutshell: An essay discussing the nature and purpose of a Wikimedia Enterprise feature that aims to give users metadata, based on existing public data and post-processing, on multimedia files (particularly images to start). [see also: General FAQ about Wikimedia Enterprise] |
Regularly updated metadata for images
[edit]Wikimedia Enterprise Q4 FY 2025-2026 task
[edit]This page describes a plan for an exploratory project to make metadata about multimedia files (images in particular, to start) hosted on the production content sites more available for data analysis. This requires examination of the current state hybrid cloud architecture as it pertains to processing between Wikimedia on-premise data centers and Wikimedia Enterprise ("WME") AWS hosting. More information about Wikimedia on-premise data center infrastructure can be found on Wikitech and more information about Wikimedia Enterprise application hosting and principles can be found at Wikimedia_Enterprise#Application_hosting on MediaWiki.org and Wikimedia_Enterprise/Principles on Meta-wiki .
Benefits
[edit]- Researchers better able to study Wikimedia multimedia, via Wikimedia Enterprise tiers for external access and via the data lake for internal access
- Wikimedians able to identify qualities about images / multimedia from centralized data
- Bulk reusers provided guidance on responsible use of metadata with Wikimedia Enterprise-hosted multimedia files (requires backfill, is post-textual metadata)
Key requirements
[edit]- Alignment with content reuse strategy
- Multimedia metadata dataset hosted via Wikimedia Enterprise
- Files in violation of content policies reasonably avoided
- Terms of Use on the dataset for downstream users, including expectations on timely removal of material violating content policies
- Tips for acceptable bulk multimedia downloads
- Undue contention on Wikimedia server environments (on-premise and WME in AWS) avoided
- Compute
- Network
- Storage
Project considerations
[edit]- This is an exploratory project for Q4 FY 2025-2026 in collaboration with Wikimedia Enterprise
- The characteristics of the dataset will grow incrementally, meaning not all metadata fields under consideration will become available at first
- Although the metadata will be freely available via Wikimedia Enterprise with delta updates (e.g., daily, stream-based, monthly reconciled base metadata set, or some approach in between), the availability of derivative files (e.g., thumbnails) will need to be assessed in coordination with Wikimedia Enterprise for feasibility in order to avoid excessive cost (i.e., derivative files or extended metadata enrichment may be part of a paid offering due to storage and egress costs, and this will be determined at the discretion of Wikimedia Enterprise)
Solution outline
[edit]- Bootstrapping process in Hadoop environment on data and files classified as public. Probably a Spark job with parameterized Airflow job for on-demand execution.
- Blend of scheduled batch processes and possible streaming (n.b. streams are often emitted to batch-scannable tables so streaming is not always strictly necessary) used to keep up with edit streams pertaining to multimedia. Probably hybrid cloud blend of some WME AWS stream processing though on downstream receipt of data lake computed outputs, and also Airflow'd reconciliation via Spark on the data lake.
- Images will be first class of files about which metadata will be constructed, other types of multimedia (if pursued at all) would be later
- Hopeful stretch goal of basic inference with an industry-standard machine vision classifier (or two or three) to be applied to standardized thumbnails and provided in metadata (helps downstream consumers avoid additional repeat compute)
- The metadata dataset will use a versioning scheme. Likely metadata fields to be gathered, over time:
- Canonical filename(s)
- Canonical wiki page ID of file
- Content addressable IDs (e.g., S3 paths - see Wikimedia Enterprise#Application hosting for more information on Wikimedia Enterprise infrastructure)
- Hash(es)
- Metadata similar to what is available from Extension:CommonsMetadata, Structured Data on Commons, and info page
- Categories
- Licensing
- Alt text (per wiki)
- Caption text (per wiki)
- Surrounding context where embedded in article or File: page (per wiki) (this is compute intensive and may need to be staged later in the development)
- File metadata
- Inference output (versioned; and as noted this is a hopeful stretch goal)
- Thumbnail in standardized encoding or relative path to standardized thumbnail (as noted above, possibly/most likely via paid agreement or with appropriate internal access; thumbnails are necessary for inference output, and so fall into the hopeful stretch goal realm)
- Thumbnail metadata (depends on thumbnail availability)
- Possible delivery of metadata files pre-optimized as industry standard Parquet (ergonomics, efficiency); Parquet is the native format in the data lake most of the time
- Possible consideration for data time travel in WME's AWS environment (although this may not be necessary or possible early on)
- For multimedia which is not image-based or which is image based but contains extractable data, analogs of image classifier output (e.g., OCR, text extraction and processing, speech-to-text, efficiently extracted keyframe / scene metadata) would be nice, but (if pursued at all) this would be later
- Code and examples may be provided, or metadata inclusion/disinclusion should be bundled, into the dataset documentation / files to encourage reduced exposure of files not yet stably embedded on content projects nor otherwise without review. For example, if a file not yet embedded in a content project has been around for six months and an ensemble rating of the file suggests it doesn't appear problematic, perhaps that would be an entry in the dataset bearing all of the metadata one would normally expect, whereas if it's less than six months old it would have less metadata. And for example a file that has been embedded within a production content project for a certain period without being removed might be considered comparatively "okay". A safety rating of some sort with the file may be useful in any case.
- A metadata and possible directory scheme to help aid removal of files or metadata discovered as violating content policies
- Basic schema / data quality checks; the design will favor stable data schemas and avoid relying on intermediate data schemas having lower guarantees; the system should be low maintenance and as self-healing as possible so that it doesn't become a piece of de facto production technical debt or maintenance burden; it's always understood that upstream data and computing resources are a work-in-progress, however
- Backoff schemes, buffering, and reconciliation for non-contention and fault tolerance
- Just enough monitoring and alerting, with graceful automated recovery
Access required
[edit]- Hadoop / Spark cluster with network access to Swift / Thumbor (exists already)
- Wikimedia Enterprise source code, ticketing
- Additional AWS access in Wikimedia Enterprise AWS account(s)
High level diagram
[edit]
Other projects that serve as inspiration
[edit]There are many examples of programs operating on multimedia and metadata from the production content sites, but the following are probably the most relevant as it pertains to this exploratory project.
- https://gitlab.wikimedia.org/mfossati/scriptz (have discussions with collaborator)
- https://gitlab.wikimedia.org/repos/structured-data/upload-tracking (have discussions with collaborator)
- T260634 Run a computer vision challenge and https://www.kaggle.com/c/wikipedia-image-caption/overview
- https://gitlab.wikimedia.org/repos/research/research-common/-/blob/main/research_common/swift/commons.py?ref_type=heads
- https://gitlab.wikimedia.org/toolforge-repos/gogologo and https://commons.wikimedia.org/w/index.php?title=Commons:Administrators%27_noticeboard&oldid=985071818#Datasets_about_potential_logos_-_December_2024_uploads
- https://github.com/htried/Image-Content-Filtration/tree/statbox-retrain-test
- https://github.com/google-research-datasets/wit
- https://gerrit.wikimedia.org/r/c/wikimedia/discovery/analytics/+/709550 (n.b., assumptions have shifted about rate limits)
- https://wikitech.wikimedia.org/wiki/Commons_Impact_Metrics/Data_Model (and corresponding code, such as this code search)
- T215413 Image Classification Research and Development
- T351677 [Research Engineering Request] Produce image datasets
- T333497 Include image/file changes in page-links-change
- T373644 Provide data on whether the file itself was changed in mediawiki.page_change.v1 event
- T331399 Create new mediawiki.page_links_change stream based on fragment/mediawiki/state/change/page
- T358756#9698097 [SPIKE] Determine general classes of available Commons images (comment)
- https://wikitech.wikimedia.org/wiki/SLO/Image_Suggestions (and all corresponding code and discussion)
- https://gitlab.wikimedia.org/repos/structured-data/image-suggestions-data-pipelines
- https://github.com/lmb-freiburg/entitynet | https://arxiv.org/abs/2505.02746 | https://huggingface.co/datasets/lmb-freiburg/entitynet (posted 30-April-2026 on wikidata-l as this page was getting readied)