Creating the optimal peanut butter and banana sandwich using computer vision and machine learning

machine-learning-peanut-butter-banana-sandwich-2.jpgmachine-learning-peanut-butter-banana-sandwich.jpg

Quarantine does weird things to people, and in the case of engineer Ethan Rosenthal it made him develop a system for optimizing a peanut butter and banana sandwich using computer vision and machine learning.

So, how do we make optimal peanut butter and banana sandwiches? It’s really quite simple. You take a picture of your banana and bread, pass the image through a deep learning model to locate said items, do some nonlinear curve fitting to the banana, transform to polar coordinates and “slice” the banana along the fitted curve, turn those slices into elliptical polygons, and feed the polygons and bread “box” into a 2D nesting algorithm.

You may have noticed that I supposedly started this project in the Spring, and it’s now August. Like most idiot engineers, I had no idea how complicated this stupid project was going to be, but time’s meaningless in quarantine, so here we are.

Nothing makes me happier than seeing people spend insane amounts of work on things that are absolutely pointless. It’s just a shame that all of his work was for nothing, because obviously the perfect peanut butter and banana sandwich is when you cover a banana in peanut butter and then wrap a slice of bread around it like a hot dog. The only downside is it kind of feels like you’re eating a big mushy penis but that’s a small price to pay to enter flavor country.

You can check out the computer science-heavy explanation for how Ethan’s system works on his site. It’s obviously the work of a lunatic. A brilliant, beautiful lunatic.

Source: Geekologie – Creating the optimal peanut butter and banana sandwich using computer vision and machine learning