Case study 02 · iPhone · 2026
A mold report you can negotiate with
Point an iPhone at a wall: Core ML outlines the mold, LiDAR measures it and a classifier turns room conditions into a growth-risk level.

Buying a second-hand home means looking at a lot of walls. Mold is easy to miss in a short viewing, hard to judge when you do see it, and expensive once you own the problem. HoMoold is an iPhone app for that moment. You point the camera at a wall, a Core ML model outlines the mold, LiDAR measures it in square centimetres, and a classifier turns weather and room conditions into a growth-risk level. Everything runs on the phone.
The problem
The people we designed for are buyers, not cleaners. They do not need advice on how to scrub a wall; they need to know whether a stain is a red flag, how big it really is, and whether to ask the seller to fix it before they sign. So the report is written for that conversation. It says “red flag” or “ask the seller to fix it”, never “here is how to clean it yourself”.
The capture screen shows the idea in one frame: mold found at 89% confidence, 71 square centimetres. Those two numbers turn a vague worry into something a buyer can put on the table.
My role
HoMoold was our Challenge 5 project at the Apple Developer Academy, built by a team of six. My part was the LiDAR measuring, the step that turns a detection into square centimetres, and the machine learning work of annotating images and training models.
What we built
The app is SwiftUI on top of ARKit. ARKit gives a live camera feed and LiDAR depth; Vision and Core ML run the detection model on each frame; a separate classifier built with Create ML takes weather and room conditions and returns a growth-risk level. The area is my part. The app asks ARKit for smoothed scene depth when the phone has LiDAR, and uses the camera’s intrinsics to turn pixels at a known depth into real size. With a segmentation mask, every depth pixel inside the stain adds its own small patch of area, so the number follows the real shape of the mold and even accounts for a wall seen at an angle. With only a box, it takes the median depth inside the box instead. Depth pixels that ARKit marks as unreliable are thrown away. Phones without LiDAR still detect mold; they just do not show the area.
Getting a trained model to work on a live camera took longer than training it. Five bugs took the longest, and each one looked like a bad model when it was really about how the image reached the model:
- The model scored about zero on every frame. Vision was receiving the raw ARKit buffer. Rendering an upright sRGB image first fixed it.
- The app crashed on the GPU and the Neural Engine. The exported model aborts there, so it runs on the CPU only: a little slower, and it never crashes.
- No boxes came out of the model. The export had no non-maximum suppression step, so the box decoding and NMS are written by hand in Swift.
- Grout lines counted as mold. Below 0.40 confidence, grout and shadows passed as mold, so 0.40 is the cut-off.
- The area was always small and the same. Vision returns boxes and masks in the upright, portrait orientation, but ARKit’s depth map stays in the sensor’s landscape orientation. Reading depth with the wrong coordinates sampled the wrong place, so I rotate the box and mask back into the depth map’s space first.
The numbers
- 0.40 is the confidence cut-off, chosen because grout lines and shadows passed as mold below it.
- 89% confidence and 71 cm² on the example capture used in the report design.
- 0 network calls for detection: the camera frames stay on the phone.
- 6 people on the team; the measuring works on any iPhone, and the area appears on phones with LiDAR.
What I learned
When a model fails in an app, check the pipe before you blame the model. Every one of the five bugs above produced the same symptom, bad or missing detections, and none of them was fixed by more training. Orientation, colour space, compute unit and post-processing all sit between the camera and the network, and each can silently turn a good model into a useless one.
I also learned to pick thresholds from failure cases, not from a default. The 0.40 cut-off came from looking at what the model got wrong on real walls: grout lines and shadows. A number like that is a product decision as much as a technical one, because it trades missed mold against false alarms for a buyer who is about to spend a lot of money.
Finally, framing matters. The same detection can be shown as a cleaning tip or as a negotiating point. Writing the report for the buyer’s real decision made the app more useful than any extra accuracy would have.
