Skip to content

Machine learning basics

Classification, regression and object detection

The kinds of questions a PetalEdge model can answer, and how to pick the right one.

On this page

The idea in one minute

Every machine-learning model answers a question. The kind of question decides which learning block you use.

TaskThe questionThe answer looks likeExample
ClassificationWhich label is this?One label from a fixed listwave, idle or shake
RegressionHow much?A numberSpeed: 3.2
Object detectionWhat is in the picture, and where?A list of objects with positionsbox at (40, 60), helmet at (120, 30)
Anomaly detectionIs this normal?A score; high means unusualMachine sound score 0.9 (unusual)

Classification

A classification model picks one label from the labels you created. It gives a score to every label, and the highest score wins.

Example: a motion model sees one second of sensor data and answers wave 0.90, shake 0.07, idle 0.03. The prediction is wave.

Regression

A regression model predicts a number instead of a label. Your labels must be numbers, for example 0, 1.5 or 3. The model can also give values in between, such as 2.1.

Example: predict how fast someone is pedalling from a wrist sensor.

Object detection

An object detection model looks at an image and finds each object in it. One image can contain many objects. PetalEdge has two styles:

  • Boxes: the model draws a rectangle around each object (Vision Pro, EdgeDetect Lite).
  • Centres: the model marks the centre of each object, which is enough for counting (NanoVision).

Face recognition is a related task: FaceRec-Edge finds faces and says who each one is.

Anomaly detection

An anomaly detection model learns only what normal looks or sounds like. When something new is too different, it gets a high anomaly score. You don't need examples of every possible fault, which is useful because faults are rare.

A simple example

You run a small workshop and want three things:

  1. Tell whether a drill is on or off from its sound → classification (Audio).
  2. Notice when the drill sounds strange → anomaly detection (Audio).
  3. Count the screws in a tray from a photo → object detection (Image, NanoVision).

Where you use this in PetalEdge

Project typeTasks available
ImageObject detection (NanoVision, Vision Pro, EdgeDetect Lite), face recognition (FaceRec-Edge)
MotionClassification, regression
AudioClassification, anomaly detection