--- 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, # 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_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.