← All courses ← Course home

Lesson 04 of 06

Utility vision: see, cut, and sharpen

Utility vision models answer focused questions about an image. They can say what it is, where things are, which pixels belong to an object, how far away something is, or how to make it clearer.

Agent brief (llms.md)

The utility type is a toolbox, not one single architecture (one model shape). The task field is the label to learn: classification, detection, segmentation, depth, or super-resolution. Start from the visual output the app needs.

PhotoExisting image
utilityFocused vision task
Existing imagePhoto or video frame
TaskClassify, detect, cut, measure, or enlarge
OutputLabel, boxes, mask, depth, or sharper image

Classification: one useful label

pvt-v2-b0 is the catalog's image-classifier family entry. It is the closest match here to ClothingCNN from the PyTorch and Xcode course. Both take an image and return a class label. The difference is that you trained ClothingCNN yourself, while pvt-v2-b0 is an official registry preset. Same kind of job, different model and recipe.

PhotoExisting pixels
Classificationpvt-v2-b0 or trained ClothingCNN
AnswerOne class label

Detection: labels plus locations

yolos-base and yolos-tiny are detection presets (detectors). Use detection when the app needs to find objects and draw a box around each one. Classification can say “shoe”. Detection can say where the shoes are in the picture. The output is still a description of an existing image, not a new image that the model drew.

Segmentation: cut an object out

efficient-sam-vitt and sam3 are segmentation presets. SAM means Segment Anything Model. Segmentation makes a more precise cut-out by marking which pixels belong to the object. The catalog notes that sam3 can use text or visual prompts, so the app can guide what should be selected with words or with a visual cue.

Depth and super-resolution

depth-anything-3-small is the depth preset and is macOS only in the registry. Use depth when the app needs a sense of near and far in an image. edsr-x2 is the super-resolution preset. Use it to make an image sharper or larger. Neither is a replacement for classification, detection, or segmentation, because each one gives a different output.

NeedWhat should the app return?
Labelclassification
Boxesdetection
Cut-outsegmentation
NeedDistance or clarity
Distancedepth-anything-3-small
Clarityedsr-x2

The architectures comparison puts classifiers next to language models. The forward course shows how ClothingCNN moves through Core AI and SwiftUI. From the metal to the model gives the reverse path, from runtime and the chip back to the app feature.

Choose the task field. Classification gives a class. Detection adds boxes. Segmentation gives a cut-out. Depth gives near and far. Super-resolution gives a sharper or larger image.

Utility also covers sound, speech, vectors, and text. Those come next.

Key concepts

  • Utility vision tasks are classification, detection, segmentation, depth, and super-resolution.
  • pvt-v2-b0 is the catalog classification preset. Same broad job as trained ClothingCNN.
  • yolos-base and yolos-tiny return boxes. efficient-sam-vitt and sam3 return cut-outs.
  • depth-anything-3-small is depth and macOS only. edsr-x2 is super-resolution.

Takeaways

  • You can pick a utility vision task by the output the app needs.
  • You can map labels, boxes, and masks to the named presets in this lesson.
  • You can check depth-anything-3-small is macOS only before you pick it.