5 ms·
Generating weird cooking recipes with TensorFlow
- Natsu 6y agoThose are hilarious, but can you make it so that the directions only refer to ingredients actually on the list? Maybe if you just generate the description and backfill the ingredient list afterward? Hmm.
- rladd 6y agoYeah, it's not too convincing. The ingredients tend to repeat and the recipe doesn't refer to the ingredients. For example, just got this: Crispy duck Stacks [INGREDIENTS] • 1 baguette, sliced 1/3 inch thick • 1/4 cup corn oil • 2 cups fresh spinach, coarsely crumbled • 1 cup grated Parmesan • 1/2 cup grated Parmesan • 1 cup creme fraiche • 1/4 cup grated Parmesan
- RodgerTheGreat 6y agofor comparison, instead of ML, this program uses a simple collection of heuristics to generate plausible (sometimes) recipes from a name: http://beyondloom.com/things/reciprocity.html#chicken%20curry http://beyondloom.com/things/reciprocity.html#chicken%20curr...
- YeGoblynQueenne 6y agoNot bad: What are you trying to cook? fried onions Hmm. Never heard of fried onions. I guess it's some kind of salad? How about: Ingredients 1 oz. onion 3/4 tsp clove 1 oz. swiss cheese 1 cups lima beans 2 cups tomato juice 3/4 liters goat milk Preparation start with a large mixing bowl. chop onion, removing any seeds, and stir in. season with clove. crumble over swiss cheese. stir in lima beans (fresh). apply dressing made by blending goat milk and tomato juice. toss thoroughly. Serves 2, at 1050 calories per serving. More context? What is this, how and why was it made, etc? Edit: aAAAAAAH! I don't want to know what it is. INSECTOID BUTTONS. AAAH.
- jojobas 6y agoThis is seriously funny, suggesting adding 1.5 liters of melted butter and 6kg of fried tofu per 2 cups or pork (sic) to make stir-fried pork.
- Natsu 6y agoIt gets worse: Hmm. Never heard of hacker news. I guess it's some kind of baked dish? How about: Ingredients 1 1/2 liters simple syrup 1 tbsp mother of vinegar 3 cups white flour 2 large salmon eggs 2 1/2 oz. american cheese 1 1/2 tbsp star anise 1 oz. pork chops 7 cups chicken breast 9 cups kiwifruit juice 3/4 cups water
- userbinator 6y agoAs amusing as the results are, I can't say I'd be too happy seeing pages of search results filled with these. There's been plenty of discussion on HN about how hard it is to find good recipes and skip over the SEO spam; imagine having to determine if they're real too...
- read_if_gay_ 6y agoJust find a good cookbook. I strongly recommend The Food Lab.
- Broken_Hippo 6y agoThat's not enough. I have several good cookbooks (and some OK ones, and one that instructs me to have my fishmonger clean the squid). I still miss the collection I left behind when I moved out of the states. But they don't fill the same niche. Cookbooks tend to do an excellent job teaching or introducing me to things I might not have otherwise cooked or searched for. The internet helps me when I have a specific ingredient I need to use up, if I am lowish on ingredients, or need something special that the cookbooks that I own simply don't offer. And sure, I could use cookbooks in a similar manner, but it isn't efficient and I don't always want to spend that sort of time.
- read_if_gay_ 6y agoI have a table in Notion where I try to put in every recipe I followed and liked the result, and it also has a column for required ingredients. That solves the specific ingredients problem, but it is a lot of effort.
- Y_Y 6y agoIf you can get over the socialist aspect of it, the BBC consistently has great recipes on its websites, and isn't even ad-supported (in some countries).
- jhrmnn 6y ago
- eatbitseveryday 6y agoI don’t see how weird recipes is an achievement? Wouldn’t stellar, workable, recipes be something more worthwhile?
- Broken_Hippo 6y agoI sometimes cook things because they seem weird or make me curious. It is definitely an achievement. It doesn't mean they aren't stellar, workable recipes by any means: Historical recipes (or even old ones from 50-70 years ago) are often weird. And workable, though if they get old enough, you have to fill in some blanks since they assume the cook is experienced more than modern recipes do. And some of the things are absolutely stellar. If you don't want to go historical, go sideways to different cultures - especially fusion foods. Indian-spiced potatoes, bell peppers, and some cheese stuff into bread cinnamon-roll-style? Yes please. Right now, AI recipes are just an oddity. Weird and barely workable at best, and that's OK. We'll get there.
- sokoloff 6y agoAt some point in history, making cheese in animal innards must have been pretty weird.
- jonnypotty 6y agoBut, but AI!
- cheschire 6y agoI get that this was just a toy, but naturally I wanted to think through how to make it useful. Like imagining building a real car from lego. I know very little about machine learning or cooking or chemistry in general. How would one make this actually useful and interesting? My guess is you would need to provide a lot more context to the database. Things like chemical composition seem like the most fundamental component of recipes. Backwards planning from the composition, you could teach it actions that generate those chemicals such as methods of cooking, and the source foods that provide the building blocks i.e. ingredients. Then at some point you could link it back to the recipes to create standardized instructions for generating certain chemical patterns. Does that sound like the right way to make this more realistic?
- YeGoblynQueenne 6y agoThat's not how neural networks er work. This one is trained to predict the next character in a sequence. It's trained on raw, unstructured text, not high-level concepts like "chemical composition" or "actions that generate chemicals" etc. Its inputs are character sequences and its outputs are character sequences. There is no way to "provide context to the database" (there is no database, just character sequences) or anything like that. If any relations like that are useful to its task of predicting the next character then your best hope is that it will somehow magickally learn them from its input text. Otherwise, the knowlede of how cooking works will simply not be encoded in its trained model.
- cheschire 6y agoI don't know enough about machine learning to specify which neural network type is correct for a given use case or which algorithm gets the most relevant results, but I do know enough to use them for things once an engineer hands me the tool. I'm not talking about how this specific network is trained. I'm talking about how this toy could be perhaps turned into something useful, like my original analogy to building a car out of lego. I understand enough about neural networks to know they are useful as Boolean supersets. It's all about how the training is defined with your training data containing the Boolean true/false values. So what I'm saying is, in order to provide context and make this toy useful, you could change your Boolean choices from sequence-based letter chains to something with a little more value like popular chemical combinations. To go further, consider how a restaurant picks its menu. That is a simple Boolean statement of "accept" or "reject". So how do you work backwards from there? Right now you require a combination of a head chef that has years of experience (your database) and an owner that has a vision. Don't miss the forest for the trees!
- Abishek_Muthian 6y agoNice work. I think generating a final 'cooked recipe' image and publishing it to the social media would attract more eyes, but that would involve whole lot of other variables and could become WMD for the recipe video spammers/scammers.
- Baeocystin 6y agoResearch on the Blue Personality Core is proceeding apace! https://www.youtube.com/watch?v=ylN8WTAfq8w https://www.youtube.com/watch?v=ylN8WTAfq8w
- mrweasel 6y agoIt seems to be missing the three page back story of how the author meet her husband on a last minute discount vacation to Uganda and how they had to seek shelter at a local tribes man who made her this exact burger in the back of his 1984 Toyota HiAce.
- samradelie 6y agomaybe it will produce recipes such as in this book https://www.thisiscolossal.com/2016/10/les-diners-de-gala-dali/ https://www.thisiscolossal.com/2016/10/les-diners-de-gala-da...
- bentpins 6y agoReminds me of Chef Watson, the recipes and directions that generated were supposed to be plausible https://www.welcome.ai/tech/food/ibm-chef-watson https://www.welcome.ai/tech/food/ibm-chef-watson
- 9nGQluzmnq3M 6y agoIt's probably a matter of time until a restaurant gets a Michelin star through AI recipes. Unlikely but tasty juxtapositions are big in trendy, high-end cuisine, as are "fusion" restaurants mixing two unrelated cuisines (yuzu all the things!), and AI seems like it would excel at finding these, hopefully with a bit of human quality control.
- YeGoblynQueenne 6y ago>> For a couple of hours of training our character-level RNN model will learn basic concepts of English grammar and punctuation (I wish I could learn English that fast!). Thankfully the task is rather easier than learning natural language concepts. The LSTM only has to learn basic concepts of the language of recipes, which is considerably simpler than unrestricted natural English. For example, in natural English one would say "You will need one cup of unsalted butter for this recipe, which you should soften. Alternatively, you can measure 2 sticks of butter". Whereas a recipe will simply say: 1 cup (2 sticks) unsalted butter, softened As in the example on the repository. Also, it seems that most, if not all, sentences begin with a verb that describes an action followed by a list of ingredients to be combined. "Stir the olive oil, garlic, thyme and 1 teaspoon salt in a saucepan;" etc. The regularity and repetitiveness of such structures makes them much easier to learn than arbitrary English text. In more practical terms, they also make the instance space for this task a lot more dense than arbitrary English text, were a sentence with a certain structure may only repeat once after a million utterances. Edit: OK, if I don't say this I'll explode. "one cup" is "two sticks"? This is just not going to work.
- 131012 6y agoI find it interesting that the model doesn't get one of the simplest rule of a recipe: the ingredients list and the ingredients in the instructions must be the same. Obviously, it is because the model "understands" the structure of the sentence, but is oblivious of the text as a whole.
- Frost1x 6y agoThis XKCD seems all too relevant: https://xkcd.com/720/ https://xkcd.com/720/
- mark_l_watson 6y agoI like this, although it is yet another example of a learned language model not capturing underlying meaning. I started a similar project last year, but using GAN (RecipeGAN). Using a GAN would learn underlying meaning, based on my experience using GANs to synthesize data that maintained univariate statistics and correlation between features of the original data. The example in the article shows how RNNs can capture structure (I have used LSTM models to synthesize JSON data, and just for fun, to model source code).
- monkeydust 6y agoClock is ticking before we get the first 'AI Restaurant' where you have to eat the Chef special and the Chef is code. Might work for the novelty factor as a pop-up that moves around, could be a way to get people into the tech.