Datasets:
File size: 8,367 Bytes
6833d5c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
---
pretty_name: Wine Images Dataset 126K
tags:
- wine
- food-and-drink
- image-classification
- computer-vision
- multimodal
task_categories:
- image-classification
- feature-extraction
- image-to-text
size_categories:
- 100K<n<1M
license: cc-by-4.0
language:
- en
dataset_info:
features:
- name: image_id
dtype: string
- name: image
dtype: image
- name: wine_name
dtype: string
config_name: default
splits:
- name: train
num_bytes: 6442450944
num_examples: 107821
download_size: 6442450944
dataset_size: 6442450944
---
# Wine Images Dataset 126K
A comprehensive dataset of 107,821 wine bottle images linked to the [Wine Text Dataset 126K](https://huggingface.co/datasets/cipher982/wine-text-126k). This companion dataset provides high-quality wine bottle images for computer vision, multimodal machine learning, and wine recognition tasks.
## Dataset Description
This dataset contains wine bottle images scraped from wine retailer websites. Each image is linked to detailed wine information (descriptions, pricing, categories, regions) via stable IDs that connect to the companion text dataset.
### Key Features
- **107,821 wine bottle images** in high resolution
- **Stable linking** to companion text dataset via `image_id`
- **Clean naming**: Images named as `wine_XXXXXX.jpg` matching text dataset IDs
- **Quality images**: Average 57KB per image, various resolutions
- **Complete coverage**: 98% of wines from text dataset have corresponding images
## Dataset Structure
```python
{
"image_id": "wine_000001", # Links to cipher982/wine-text-126k
"image": <PIL.Image>, # Wine bottle image
"wine_name": "Dom Perignon Vintage 2008" # Wine name for reference
}
```
## Companion Dataset
This image dataset is designed to work with:
- **[cipher982/wine-text-126k](https://huggingface.co/datasets/cipher982/wine-text-126k)**: Text descriptions, prices, categories, regions
## Usage
### Basic Loading
```python
from datasets import load_dataset
# Load the image dataset
image_dataset = load_dataset("cipher982/wine-images-126k")
# Load the companion text dataset
text_dataset = load_dataset("cipher982/wine-text-126k")
# Access images and text
images = image_dataset["train"]
texts = text_dataset["train"]
# Example: Get image and text for same wine
wine_id = "wine_000001"
wine_image = images.filter(lambda x: x["image_id"] == wine_id)[0]["image"]
wine_text = texts.filter(lambda x: x["id"] == wine_id)[0]
```
### Multimodal Usage
```python
import pandas as pd
from datasets import load_dataset
# Load both datasets
images = load_dataset("cipher982/wine-images-126k")["train"]
texts = load_dataset("cipher982/wine-text-126k")["train"]
# Convert to DataFrames for easy joining
df_images = images.to_pandas().set_index('image_id')
df_texts = texts.to_pandas().set_index('id')
# Join datasets on wine ID
df_multimodal = df_texts.join(df_images, how='inner')
print(f"Multimodal dataset: {len(df_multimodal):,} wines with both text and images")
# Example: Access wine with both image and description
wine = df_multimodal.iloc[0]
print(f"Name: {wine['name']}")
print(f"Description: {wine['description'][:100]}...")
print(f"Price: ${wine['price']}")
wine['image'].show() # Display the wine bottle image
```
### Computer Vision Tasks
```python
from datasets import load_dataset
import torch
from torchvision import transforms
# Load dataset
dataset = load_dataset("cipher982/wine-images-126k")["train"]
# Preprocessing for computer vision models
transform = transforms.Compose([
transforms.Resize((224, 224)),
transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225])
])
# Process images
def preprocess(example):
example["image"] = transform(example["image"])
return example
dataset = dataset.map(preprocess)
```
## Data Quality
- **Image Count**: 107,821 wine bottle images
- **Coverage**: 98.0% of wines from text dataset have images
- **File Format**: JPEG images
- **Average Size**: 57KB per image
- **Total Size**: ~5.8GB
- **Naming**: Consistent `wine_XXXXXX.jpg` format
- **Quality**: High-resolution product photos from wine retailers
## Use Cases
### Computer Vision
- **Wine Classification**: Classify wines by bottle shape, label, region
- **Brand Recognition**: Identify wine producers from bottle images
- **Quality Assessment**: Analyze bottle condition and presentation
- **Object Detection**: Detect wine bottles in complex scenes
### Multimodal Learning
- **Image-Text Matching**: Match wine descriptions to bottle images
- **Caption Generation**: Generate wine descriptions from bottle images
- **Visual Question Answering**: Answer questions about wine bottles
- **Recommendation Systems**: Visual and textual wine recommendations
### Research Applications
- **Food & Beverage Analysis**: Study wine packaging and branding trends
- **Cultural Studies**: Analyze wine bottle design across regions
- **Marketing Research**: Study visual elements in wine presentation
- **Computer Vision Benchmarks**: Large-scale wine image classification
## Dataset Statistics
### Image Coverage by Region
| Region | Images | Coverage |
|------------|---------|----------|
| other | 84,127 | 79.5% |
| california | 10,687 | 98.2% |
| france | 4,753 | 98.2% |
| italy | 4,254 | 98.4% |
### Image Coverage by Wine Category
| Category | Images | Coverage |
|------------|---------|----------|
| red_wine | 60,893 | 97.9% |
| other | 29,732 | 97.5% |
| white_wine | 25,701 | 97.9% |
| rosΓ© | 2,658 | 98.0% |
| dessert | 2,469 | 98.0% |
| sparkling | 1,568 | 97.6% |
## Ethical Considerations
- **Data Source**: Images collected from public wine retailer websites
- **Privacy**: No personal information in images
- **Commercial Use**: Please respect original retailers' intellectual property
- **Attribution**: Images represent retailer product photography
- **Quality**: Images reflect commercial wine presentation standards
## Technical Details
### File Organization
```
wine-images-126k/
βββ images/
β βββ wine_000000.jpg
β βββ wine_000001.jpg
β βββ ... (107,821 images)
βββ image_metadata.json
βββ README.md
```
### Metadata Format
```json
{
"image_id": "wine_000001",
"filename": "wine_000001.jpg",
"original_filename": "lmgmud1xsenlouwpzysc.jpg",
"file_size": 47234
}
```
## Linking with Text Dataset
Images are linked to text data via stable `image_id` fields:
```python
# Text dataset (cipher982/wine-text-126k)
{
"id": "wine_000001",
"name": "Dom Perignon Vintage 2008",
"description": "Complex champagne with...",
"image_id": "wine_000001" # Links to this dataset
}
# Image dataset (cipher982/wine-images-126k)
{
"image_id": "wine_000001", # Same ID links back to text
"image": <wine bottle image>,
"wine_name": "Dom Perignon Vintage 2008"
}
```
## Citation
If you use this dataset in your research, please cite:
```bibtex
@dataset{wine_images_126k,
title={Wine Images Dataset 126K},
author={David Rose},
year={2025},
url={https://huggingface.co/datasets/cipher982/wine-images-126k}
}
```
Also cite the companion text dataset:
```bibtex
@dataset{wine_text_126k,
title={Wine Text Dataset 126K},
author={David Rose},
year={2025},
url={https://huggingface.co/datasets/cipher982/wine-text-126k}
}
```
## License
This dataset is released under the **Creative Commons Attribution 4.0 International License (CC-BY-4.0)**.
**You are free to:**
- π **Share** β copy and redistribute the material in any medium or format
- π§ **Adapt** β remix, transform, and build upon the material for any purpose, even commercially
**Under the following terms:**
- π **Attribution** β You must give appropriate credit and indicate if changes were made
**Data Collection Notice:**
The underlying wine bottle images were collected from publicly available retailer websites for research purposes under fair use. This dataset compilation, stable ID system, and organized structure represent our original contribution covered by this license.
Users should respect the intellectual property rights of the original wine bottle photography and retailer content. |