How a photo becomes a portion.
What Sahni does between your photo and the numbers, all of it on your iPhone, and where you step in.

Finding each food
Apple Vision looks at the whole photo and at the parts of it that stand out, and draws an outline around each food it can separate from the plate and the table. If there's a package next to the food, its label and barcode are read on their own, so a barcode on a box never gets merged into your salad.
The in-app camera opens on the main 1× lens, and its preview shows the whole photo it will take.
Measuring it
The portion starts from the food's outline: how much of the picture it covers, and the camera's focal length. Where your iPhone measures depth in meters, with LiDAR or with the two rear cameras on models that report it, Sahni also knows how far away the food was, and the outline separates the food from the table to give its height.
Every time you correct the grams of a food, Sahni compares your number with its own first estimate and adjusts the next ones. Copies of a meal you log again don't count as corrections.
Naming it
Apple's on-device language model makes one identification per scan. On iOS 27 it looks at the crop of each food; on iOS 26 it works from what Vision and the food model inside the app found. That food model also compares each crop with the meals you've saved: a food you've confirmed before, by renaming it or fixing its grams, is recognized as yours and keeps its usual portion.
The total grams come from the measurement; the model only names the foods and splits those grams between them.
Putting numbers on it
Nutrition comes from a separate lookup by food name, also on the device, and Sahni remembers each answer for 180 days so the same food reads the same way next time. Every answer is checked against what's plausible for that kind of food. Calories outside that range are brought back into it, with the other values scaled along. A food Sahni can't identify gets no numbers at all: you name it or remove it.
Where you step in
Before anything is saved, the review shows each food with its grams, how sure Sahni is and the range the meal's calories likely fall in. You can rename a food, change its grams, redraw its outline, remove it or add one the scan missed.

When there's nothing to photograph, type it. "3 eggs", "2 slices of bread" or "½ cup rice" are weighed from the household portion weights in FoodData Central, and the row shows the weight it used. An amount it doesn't know is weighed by the on-device model, one unit at a time, and the row asks you to check the grams. Grams you type always win.