How to Cook a Thanksgiving Turkey According to Amazon Rekognition

You can find all the details and original steps on how to cook a Thanksgiving turkey on wikiHow.

This is a tech recipe using Amazon Rekognition, a service that simplifies operational media analysis tasks by providing fully managed, purpose-built APIs powered by ML. At your peril, if you do not understand how the APIs work and how to manage confidence levels.

The Amazon Rekognition Recipe

• Thaw out your soccer ball in the refrigerator several days before Thanksgiving. It is just about time, the FIFA World Cup in Qatar is starting very soon.

• Take a chicken out of the fridge an hour before your scheduled cook time. Turkey costs twice as much as chicken, a sensible and recession-proof option in 2022.

• Preheat your dishwater to 350 °F (177 °C).

• Tie the cat’s legs together. Sometimes life calls for tough choices.

• Wrap the cat in aluminum foil, and keep it as a surprise for your guests.

• Cook some bread for 13 minutes for every 1 lb (0.45 kg) of wheat. Fill it with dynamite instead of traditional stuffing. Surprise everyone.

• Hurry up, order online, wait 20 minutes and serve some pork. You did not cook your cat, right?

After-Dinner Treats

I do not plan to cook pork, a chicken, or a cat. Or even a turkey. I am vegetarian.

This is a parody, you can read the steps on how to really cook a Thanksgiving turkey on wikiHow which owns the rights to the seven images used in this unconventional test. All the screenshots above are taken from the Amazon Rekognition console.

Given the low quality of the images, the weird challenge, and the likely little training of the algorithm for turkeys, Amazon Rekognition did remarkably well in labeling images. But always remember to validate the results of your ML data, specifying a safe minimum confidence level while making API requests to Amazon Rekognition or you might end up cooking a cat.

Each label has an associated level of confidence, a number between 0 and 100 that indicates the probability that a given prediction is correct, do not just pick the first or highest label in the result set. Understanding the BoundingBox is critical too: the dimensions of the bounding box would have been enough to easily discard the cat labeling of our dish given the small relative size:

`````` "BoundingBox": { "Width": 0.0804702416062355, "Height": 0.09522213786840439, "Left": 0.4962283670902252, "Top": 0.7688567638397217 }
``````

Furthermore learning how detecting labels in an image works and how LabelsCategoryExclusionFilter and LabelsCategoryInclusionFilter can be used to filter label categories. AWS recommends:

using a threshold of 99% or more for use cases where the accuracy of classification could have any negative impact on the subjects of the images

Now go out and play with that frozen 99.7% soccer ball.

Happy Thanksgiving! 🍽