> Markdown version of [/videos/1272-mastering-image-classification-a-journey-with-cakes?t=0](https://www.wearedevelopers.com/videos/1272-mastering-image-classification-a-journey-with-cakes?t=0). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Mastering Image Classification: A Journey with Cakes Carly Richmond proves standard web developers can conquer machine learning without deep math. Learn to build custom image classifiers using TensorFlow.js and transfer learning to detect hyper-realistic cakes. - **Speakers:** Carly Richmonds - **Event:** WeAreDevelopers LIVE - **Published:** December 16, 2024 - **Duration:** 25:19 - **URL:** https://www.wearedevelopers.com/videos/1272-mastering-image-classification-a-journey-with-cakes ## Summary Carly Richmond explores the mechanics of image classification by tackling a lighthearted challenge: distinguishing hyper-realistic cakes from everyday objects using TensorFlow.js. As a JavaScript engineer diving into machine learning, the project starts with data curation, utilizing Playwright to scrape bakeries and the Unsplash API for negative examples, culminating in an Elasticsearch storage pipeline. This early phase highlights a crucial foundational insight: data quality directly impacts model success, as unfiltered logos and geometrically ambiguous items easily introduce heavy training bias into a deep learning dataset. Initial attempts to use off-the-shelf models expose the limitations of generic data sets. MobileNet, a standardized image classification model, mistakenly identifies cakes as candles or soap dispensers due to narrow feature recognition. Although Coco-SSD utilizes object detection algorithms with slightly better accuracy, it remains imperfect for highly specialized domains. Attempting to solve this by building a custom Convolutional Neural Network (CNN) from scratch reveals the underlying mechanics of configuring kernels, pooling stages to prevent overfitting, and flattening matrices for Softmax activation layers. Ultimately, the critical breakthrough emerges through transfer learning, proving that standard web developers can stand on the shoulders of machine learning giants. This methodology leverages the robust feature-extraction capabilities of a massive pre-trained model while bolting on a specialized binary entropy classification "head" configured exclusively for the target dataset. By bridging standard multi-dimensional array manipulation with tensor memory management, developers can achieve highly accurate, domain-specific classification without needing a monolithic training architecture or deep mathematical expertise. **Keywords:** tensorflow.js image classification, machine learning in javascript, convolutional neural network architecture, transfer learning implementation, mobilenet classification model, coco-ssd object detection, tensors and multi-dimensional arrays, playwright web scraping, elasticsearch data persistence, binary cross-entropy classification, softmax activation layers, neural network over-fitting, model training epochs, custom sequential models, tensor memory management ## Chapters 1. **Introduction to image classification and the cake detection challenge** (00:00) — The premise of the presentation and the popular game show that inspired analyzing object classification. 1. **Sourcing and preparing custom images for a binary dataset** (04:43) — Scraping web images with Playwright and managing a dataset of cakes versus non-cakes to prepare for training. 1. **Evaluating MobileNet and COCO-SSD pre-trained computer vision models** (07:41) — Using out-of-the-box TensorFlow.js model algorithms for general classification and specific object detection on custom images. 1. **Building a custom Convolutional Neural Network pipeline from scratch** (12:46) — Creating, compiling, and training a sequential convolutional neural network in TensorFlow.js to isolate image features. 1. **Improving detection accuracy by reusing features through transfer learning** (19:00) — Combining MobileNet feature extraction with a custom classification head to bypass initial training failures. 1. **Testing human visual accuracy against multiple machine learning models** (21:35) — An interactive demonstration comparing human visual detection against various evaluated computer vision programs to measure accuracy. ## Related Moments - [Experimenting with JavaScript machine learning for cake detection](https://www.wearedevelopers.com/videos/1305-building-your-own-classification-model-with-javascript-coffee-with-developers-carly-richmond) (from "Building Your Own Classification Model with JavaScript - Coffee with Developers - Carly Richmond") - [Exploring machine learning and image classification in JavaScript](https://www.wearedevelopers.com/videos/1626-is-it-f-ake-image-classification-with-tensorflow-js) (from "Is it (F)ake?! Image Classification with TensorFlow.js") - [Comparing custom machine learning models with transfer classification](https://www.wearedevelopers.com/videos/1305-building-your-own-classification-model-with-javascript-coffee-with-developers-carly-richmond) (from "Building Your Own Classification Model with JavaScript - Coffee with Developers - Carly Richmond") - [Implementing machine learning with Core ML and Vision](https://www.wearedevelopers.com/videos/1515-harnessing-apple-intelligence-live-coding-with-swift-for-ios) (from "Harnessing Apple Intelligence: Live Coding with Swift for iOS") - [Lessons learned on understanding how machine learning models work](https://www.wearedevelopers.com/videos/1626-is-it-f-ake-image-classification-with-tensorflow-js) (from "Is it (F)ake?! Image Classification with TensorFlow.js") - [From crafted algorithms to deep learning and pattern recognition](https://www.wearedevelopers.com/videos/1000-the-shadows-of-reasoning-new-design-paradigms-for-a-gen-ai-world) (from "The shadows of reasoning – new design paradigms for a gen AI world") ## Related Articles - [How machine learning can help us tell fact from fiction](https://www.wearedevelopers.com/magazine/509-how-machine-learning-can-help-us-tell-fact-from-fiction) - [Dev Digest 112 - The True Crime of AI Development](https://www.wearedevelopers.com/magazine/421-dev-digest-112-the-true-crime-of-ai-development) - [All the videos of Halfstack London 2024!](https://www.wearedevelopers.com/magazine/521-all-the-videos-of-halfstack-london-2024) - [MLops – Deploying, Maintaining And Evolving Machine Learning Models in Production](https://www.wearedevelopers.com/magazine/115-mlops-deploying-maintaining-and-evolving-machine-learning-models-in-production) ## Related Jobs - [Machine Learning Engineer](https://www.wearedevelopers.com/jobs/ext/1355348-machine-learning-engineer) at **TWILIO** - [Machine Learning Engineer](https://www.wearedevelopers.com/jobs/ext/588393-machine-learning-engineer) at **Twilio** - [Staff, Machine Learning Engineer (L4)](https://www.wearedevelopers.com/jobs/ext/1202639-staff-machine-learning-engineer-l4) at **Twilio** - [Data Scientist](https://www.wearedevelopers.com/jobs/ext/1351648-data-scientist) at **Almedia** - [Machine Learning Engineer](https://www.wearedevelopers.com/jobs/ext/1377841-machine-learning-engineer) at **Almedia** - [Machine Learning Engineer](https://www.wearedevelopers.com/jobs/ext/1597388-machine-learning-engineer) at **ZEISS Group**