Prettifying the results

The program prints the results. It looks something as follows:

 Error: <nil> []facebox.Face{facebox.Face{Rect:facebox.Rect{Top:221, Left:303, Width:75, Height:75}, ID:"", Name:"", Matched:false, Confidence:0, Faceprint:""}}

This is a rather boring result to be printed on the terminal output. We live in the age of GUIs now! So let's draw our results.

As a result, we want the window to show whatever the webcam is showing. Then, when a key is pressed, the image is captured, and processed by MachineBox. If a face is found, a rectangle should be drawn around it. If the face is recognized as MC Hot Dog, then label the box HotDog, followed by the confidence. Otherwise, the box should be labelled Not HotDog. The code for this ...

Get Go Machine Learning Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.