| # Recipe1M Processed Dataset Collection |
| <!-- |
| [](https://github.com/yourusername/recipe1m-processed) |
| [](LICENSE.md) --> |
|
|
| ## Abstract |
|
|
| This repository provides two complementary processed datasets derived from the Recipe1M dataset: |
|
|
| 1. **Instruction-Ingredient Alignment Dataset** (`processed_instructions.json`): Fine-grained instruction-ingredient alignment at the fragment level with multi-granularity ingredient representations |
| 2. **Multimodal Recipe Dataset** (`train_data.json`, `val_data.json`, `test_data.json`): Recipe data with ingredient-image mappings and recipe images for multimodal learning |
|
|
| Together, these datasets enable comprehensive recipe understanding tasks including ingredient recognition, instruction generation, multimodal learning, and cooking process modeling. |
|
|
| --- |
|
|
| ## Table of Contents |
|
|
| - [Dataset Overview](#dataset-overview) |
| - [Dataset 1: Instruction-Ingredient Alignment](#dataset-1-instruction-ingredient-alignment) |
| - [Dataset 2: Multimodal Recipe Data](#dataset-2-multimodal-recipe-data) |
| - [Combined Usage Examples](#combined-usage-examples) |
| - [Use Cases](#use-cases) |
| - [License](#license) |
| - [Citation](#citation) |
|
|
| --- |
|
|
| ## Dataset Overview |
|
|
| | Dataset | Files | Key Features | Primary Use Cases | |
| |---------|-------|--------------|-------------------| |
| | **Instruction-Ingredient Alignment** | `processed_instructions.json` | Fragment-level alignment, multi-granularity ingredients | Instruction parsing, ingredient extraction, process understanding | |
| | **Multimodal Recipe Data** | `train_data.json`, `val_data.json`, `test_data.json` | Image mappings, standardized ingredients, train/val/test splits | Multimodal learning, image-based retrieval, model training | |
|
|
| --- |
|
|
| ## Dataset 1: Instruction-Ingredient Alignment |
|
|
| ### Overview |
|
|
| Fine-grained instruction-ingredient alignment where each cooking instruction is fragmented at ingredient boundaries and aligned with corresponding ingredient information at three levels of granularity. |
|
|
| ### File Structure |
|
|
| **processed_instructions.json** |
| - **Format**: JSON dictionary with recipe IDs as keys |
| - **Recipe ID Format**: 10-character hexadecimal (e.g., `e40cfb8510`) |
| |
| ### Data Schema |
| |
| ```json |
| { |
| "id": "recipe_id", |
| "instructions": [ |
| { |
| "instruction": "cooking step text fragment", |
| "raw_ing": "original ingredient with quantity", |
| "final_ing": "standardized ingredient name", |
| "no_with_ing": "ingredient without modifiers" |
| } |
| ] |
| } |
| ``` |
| |
| ### Field Descriptions |
| |
| #### Top-Level Fields |
| |
| | Field | Type | Description | Example | |
| |-------|------|-------------|---------| |
| | `id` | String | Unique recipe identifier | `"e40cfb8510"` | |
| | `instructions` | List | Cooking steps with ingredient alignment | See below | |
| |
| #### Instruction Object Fields |
| |
| | Field | Type | Description | Example | |
| |-------|------|-------------|---------| |
| | `instruction` | String | Instruction text fragment | `"stir together flour,"` | |
| | `raw_ing` | String/null | Original ingredient with quantities | `"2 c. flour"` | |
| | `final_ing` | String/null | Standardized ingredient name | `"flour"` | |
| | `no_with_ing` | String/null | Ingredient without modifiers | `"flour"` | |
| |
| **Note**: `null` values indicate instruction steps without specific ingredient references (e.g., cooking techniques, equipment preparation). |
| |
| ### Example Data |
| |
| ```json |
| { |
| "id": "e40cfb8510", |
| "instructions": [ |
| { |
| "instruction": "stir together flour,", |
| "raw_ing": "2 c. flour", |
| "final_ing": "flour", |
| "no_with_ing": "flour" |
| }, |
| { |
| "instruction": " soda ", |
| "raw_ing": "1 teaspoon baking soda", |
| "final_ing": "baking soda", |
| "no_with_ing": "baking soda" |
| }, |
| { |
| "instruction": "and salt.", |
| "raw_ing": "1/2 teaspoon salt", |
| "final_ing": "salt", |
| "no_with_ing": "salt" |
| }, |
| { |
| "instruction": "stir into a very stiff batter.", |
| "raw_ing": null, |
| "final_ing": null, |
| "no_with_ing": null |
| }, |
| { |
| "instruction": "bake 1 hour at 325 degrees.", |
| "raw_ing": null, |
| "final_ing": null, |
| "no_with_ing": null |
| } |
| ] |
| } |
| ``` |
| |
| ### Key Features |
| |
| - **Instruction Fragmentation**: Instructions split at ingredient boundaries while maintaining grammatical structure |
| - **Multi-Granularity**: Three levels of ingredient representation (raw, final, no modifiers) |
| - **Complete Process**: Includes all steps, both ingredient-specific and technique-only |
| - **Ingredient Repetition**: Tracks multiple uses of the same ingredient throughout the recipe |
| |
| --- |
| |
| ## Dataset 2: Multimodal Recipe Data |
| |
| ### Overview |
| |
| Structured recipe data with ingredient-image mappings, standardized ingredient names, and associated recipe images. Split into training, validation, and test sets for machine learning workflows. |
| |
| ### File Structure |
| |
| | File | Purpose | Recipe IDs Example | |
| |------|---------|-------------------| |
| | `train_data.json` | Training set | `df203c7b00`, `da3722f92a`, ... | |
| | `val_data.json` | Validation set | `da3722f92a`, ... | |
| | `test_data.json` | Test set | `da36dcb1f9`, ... | |
| |
| ### Data Schema |
| |
| ```json |
| { |
| "recipe_id": { |
| "ing_img_ids": [image_id or null, ...], |
| "ing_text_18k": ["standardized_name" or null, ...], |
| "ing_texts": ["original ingredient text" or null, ...], |
| "instructions": ["step 1", "step 2", ...], |
| "recipe_img_ids": ["image1.jpg", "image2.jpg", ...] |
| } |
| } |
| ``` |
| |
| ### Field Descriptions |
| |
| | Field | Type | Description | Example | |
| |-------|------|-------------|---------| |
| | `ing_img_ids` | List[int/null] | Image IDs from ingredient database | `[17263, 8861, None, ...]` | |
| | `ing_text_18k` | List[str/null] | Standardized names (18K vocabulary) | `['butter', 'olive oil', None, ...]` | |
| | `ing_texts` | List[str/null] | Original text with quantities | `['1 teaspoon butter', '2 teaspoons olive oil', ...]` | |
| | `instructions` | List[str] | Cooking steps in order | `['melt butter', 'add garlic', ...]` | |
| | `recipe_img_ids` | List[str] | Recipe image filenames | `['50cbeb2173.jpg', '95f9aa7309.jpg', ...]` | |
| |
| ### Example Data |
| |
| ```json |
| { |
| "da3722f92a": { |
| "ing_img_ids": [17263, 8861, 11498, 3496, None, 578], |
| "ing_text_18k": ["butter", "olive oil", "garlic cloves", "shrimp", None, "lemon"], |
| "ing_texts": [ |
| "1 teaspoon butter", |
| "2 teaspoons olive oil", |
| "3 garlic cloves, minced or pressed", |
| "1 lb california shrimp or 1 lb spiny lobster", |
| None, |
| "1 lemon, juice of" |
| ], |
| "instructions": [ |
| "melt butter and oil together in saute pan.", |
| "add garlic, saute for one minute, and add shrimp.", |
| "saute for one minute, add wine, lemon juice, salt, and pepper.", |
| "saute quickly while sauce reduces and shrimp turns pink.", |
| "do not overcook.", |
| "sprinkle with parsley before serving." |
| ], |
| "recipe_img_ids": [ |
| "50cbeb2173.jpg", |
| "95f9aa7309.jpg", |
| "b81c7c2b13.jpg", |
| "977929a1ff.jpg" |
| ] |
| } |
| } |
| ``` |
| |
| ### Key Features |
| |
| - **Multimodal Alignment**: Links text ingredients to visual representations |
| - **Standardization**: 18K ingredient vocabulary for consistency |
| - **Image References**: Both ingredient images and recipe images |
| - **Train/Val/Test Split**: Ready for supervised learning workflows |
| - **Null Handling**: Graceful handling of missing image mappings |
| |
| |
| --- |
| |
| |
| --- |
| |
| ## Related Resources |
| |
| These processed datasets build upon: |
| - **Recipe1M Dataset**: Original source of recipe data and images |
| - **Ingredient Image Database**: Referenced by `ing_img_ids` |
| - **Recipe Image Database**: Referenced by `recipe_img_ids` |
| - **18K Ingredient Vocabulary**: Used for standardization |
| |
| --- |
| |
| ## License |
| |
| Please refer to the original Recipe1M dataset license and terms of use. These processed versions maintain the same licensing requirements as the source dataset. |
| |
| --- |
| |
| ## Citation |
| |
| If you use these datasets, please cite the original Recipe1M work: |
| |
| ```bibtex |
| @inproceedings{salvador2017learning, |
| title={Learning Cross-Modal Embeddings for Cooking Recipes and Food Images}, |
| author={Salvador, Amaia and Hynes, Nicholas and Aytar, Yusuf and Marin, Javier and |
| Ofli, Ferda and Weber, Ingmar and Torralba, Antonio}, |
| booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition}, |
| year={2017} |
| } |
| ``` |
| <!-- |
| For these processed datasets: |
| |
| ```bibtex |
| @misc{recipe1m_processed_collection, |
| title={Recipe1M Processed Dataset Collection: Instruction-Ingredient Alignment and Multimodal Recipe Data}, |
| author={Your Name}, |
| year={2025}, |
| howpublished={\url{https://github.com/yourusername/recipe1m-processed}}, |
| } |
| ``` --> |
| |
| --- |
| |
| ## Acknowledgments |
| |
| These datasets are derived from the Recipe1M dataset. We acknowledge the original authors for their valuable contribution to the research community. The processing includes instruction-ingredient alignment and multimodal mappings to enable new research directions. |
| |
| --- |
| <!-- |
| ## Contact |
| |
| For questions or issues regarding these processed datasets, please open an issue on GitHub or contact [your contact information]. |
| |
| --- --> |
| |
| ## Appendix: Quick Reference |
| |
| ### Dataset 1: Instruction-Ingredient Alignment |
| - **Files**: `processed_instructions.json` |
| - **Key Features**: Fragment-level alignment, 3 granularity levels |
| - **Best For**: Instruction parsing, ingredient extraction |
| |
| ### Dataset 2: Multimodal Recipe Data |
| - **Files**: `train_data.json`, `val_data.json`, `test_data.json` |
| - **Key Features**: Image mappings, train/val/test split |
| - **Best For**: Multimodal learning, ingredient recognition |
| |
| ### Common Recipe ID Format |
| - **Format**: 10-character hexadecimal |
| - **Example**: `da3722f92a`, `e40cfb8510` |
| - **Usage**: Links recipes across both datasets |