Laborde connects machine learning to React Native’s “learn once, write anywhere” approach. He uses spell-checking as an example: one model can work across languages when trained on different datasets, instead of building a separate solution for each language. He focuses on supervised learning and emphasizes that its underlying math is approachable.
Taming the Machine (feat. Nicolas Cage)
Speaker
Gant Laborde, a teacher and writer at Infinite Red, explains machine learning for React Native developers at React Native EU.
Laborde describes an image as a set of numerical inputs, such as the 784 grayscale values in a 28-by-28 image. He shows how iOS Vision can identify faces and landmarks, and introduces React Native Vision as a way to use these capabilities from React Native. In a live demo, a downloaded food model classifies hot dogs, fries, pancakes, and hamburgers.
Laborde changes the demo from food classification to face detection by swapping the model and provider. The updated app draws a detector over faces and checks whether someone resembles the person associated with the Declaration of Independence gag. The person flagged in the demo is Matt Hargett, not Nicolas Cage.
Laborde explains that he gathered Nicolas Cage photos, collected other celebrities as examples, removed faces from images, and checked the data for errors. Early training did not work: accuracy and loss failed to diverge, so he combined his facial data with a researcher’s model trained on 500,000 images. He then quantized the large model and demonstrated it identifying Cage, including a poor-quality photo at 70% confidence while identifying his friend Frank as not Cage at 99%.
Takeaways
- Treat machine learning as a reusable approach: train a model on new data rather than rewriting the whole solution for each category or language.
- A small image classifier can power a practical React Native demo when paired with a camera view and a model provider.
- Plan to iterate on training data and model architecture; an initial model may not work, even after hours of training.
- Check training results and test on varied images before trusting a classifier’s output.
- Quantization can help reduce a model’s size for a mobile app.
Mentioned in this talk
Search inside this talk
What was claimed 8
- works atGant Laborde works at Infinite Red
“the good people at Infinite Red”
YouTube Unverified1 source· Talk
- builtGant Laborde built Solidarity
“I actually came up with Solidarity last year at React Native EU”
YouTube Unverified1 source· Talk
- integrates withReact Native Vision integrates with Vision framework
“as soon as it goes to Swift and iOS, we get it in React Native”
YouTube Unverified1 source· Talk
- builtRay Deck built React Native Vision
“he wrote a library that he and I now call React Native Vision”
YouTube Unverified1 source· Talk
- featureHotdog Not Hotdog: Classifies a photo as a hot dog or not
“it tells you whether it’s a hot dog or not”
YouTube Unverified1 source· Talk
- featureNicolas Cage face recognition model: Recognizes Nicolas Cage in images
“There's no Nick model that exists out there in the world, so I had to actually do this”
YouTube Unverified1 source· Talk
- uses
“I went into NVIDIA DIGITS, and I could see the problem”
YouTube Unverified1 source· Talk
- metricNicolas Cage face recognition model: Face 0, Nick, at 70%
“Face 0, Nick, at 70%”
YouTube Unverified1 source· Talk









