goofi v3.0.0

Computer Vision

Explore live landmarks, object detections, and masks from your webcam.

Computer Vision — illustrated recipe guide

Use one camera feed to compare what the models see: body landmarks, object boxes, and a subject mask.

Start here

Enable Graphics, Signal, and Computer Vision. Both recipes use Camera device 0; change Device if your webcam uses another index.

Models may download on first use. Allow setup to finish, then stand in good light with the subject clearly visible.

Open the first recipe ↓ Bundle setup →

Meet the nodes

Use the node pictures to find the inputs and outputs. Each experiment points to a recipe you can build on.

01 / SIGNAL
Flow py
image
flow

Measure movement between images

Try it. Optional extension to recipe 1: connect Camera.out to Flow.image to compare optical flow with landmark motion.

Good to know

Flow needs two frames before it can report movement. Values describe motion relative to image width and height per second. Changing frame size restarts the comparison.

Inputs: image: ARRAY

Outputs: flow: ARRAY

02 / SIGNAL
PoseEstimation py
image
positions
velocities
expression

Find body, hand, and face landmarks

Try it. In recipe 1, compare pose, hands, and face with the corresponding subject in view.

Good to know

Models need a clearly visible subject. Expression coefficients describe model outputs, not reliable labels of emotions.

Inputs: image: ARRAY

Outputs: positions: ARRAY · velocities: ARRAY · expression: ARRAY

03 / GRAPHICS
Skeleton wgsl
positions
velocities
out

Draw the detected landmarks

Try it. Connect positions and velocities from PoseEstimation. Try tone/colour = part, then speed with a moving input.

Good to know

Keep rig/fit off to preserve normalized image coordinates. Automatic rig selection uses the landmark layout; missing detections can leave the view empty.

Inputs: positions: ARRAY · velocities: ARRAY

Outputs: out: TEXTURE

04 / SIGNAL
Objects py
image
boxes

Find objects and their boxes

Try it. Change objects/confidence and compare how many boxes remain. Use objects/only to request a class such as person or cup.

Good to know

Boxes include confidence and class information. A model may miss an object or assign the wrong label; inspect the image alongside its output.

Inputs: image: ARRAY

Outputs: boxes: ARRAY

05 / SIGNAL
Segment py
image
mask

Make a mask for a subject

Try it. Start with segment/subject = selfie on a portrait. Raise segment/soften to blur the edge.

Good to know

Scene mode uses segment/category to choose a class. Category 0 is background. A mask contains per-pixel values, not a bounding box.

Inputs: image: ARRAY

Outputs: mask: ARRAY

Patch recipes

RECIPE 01

Your movement as a skeleton

See your webcam beside the landmarks drawn as a moving skeleton.

Your movement as a skeleton — example node outputs
Illustrative model output from the earlier photo example. The download now uses your live webcam.

Download patch ↓

  1. Check Camera.out, then choose Device if the webcam is not the one you want. Mirror changes left and right.
  2. Start with Mode set to pose and step back so your body is visible. Watch Skeleton update as you move.
  3. Try hands with a hand close to the lens, or face with your face clearly visible. A new mode may need to load its model.
Camera.outPoseEstimation.image
PoseEstimation.positionsSkeleton.positions
PoseEstimation.velocitiesSkeleton.velocities

What to look for. The detected points form the selected rig. The input must contain a suitable subject; a blank output can mean that nothing was detected.

Try it

Compare slow and quick movements. Adjust Confidence to change which detections are accepted.

Camera connects directly to PoseEstimation; Goofi reads its texture as an RGB array. Missing landmarks may leave Skeleton empty; check framing and light first.

RECIPE 02

Your camera: boxes and masks

Send the same webcam frame to object detection and segmentation.

Your camera: boxes and masks — example node outputs
Illustrative model output from the earlier photo example. The download now uses your live webcam.

Download patch ↓

  1. Face the webcam and check the input image. Start with a clearly visible person.
  2. Watch the live mask beside the camera. Expand Objects.boxes in the graph to inspect detection coordinates and confidence.
  3. Raise Confidence to reject weaker object detections. Soften changes the mask edge.
Camera.outObjects.image
Camera.outSegment.image

What to look for. A box locates a detection with a rectangle. A mask follows the pixels assigned to the subject, including its outline.

Try it

Move an object into view while staying in frame. Compare object detections with the person mask.

Detection and segmentation answer different questions and can disagree. Segment starts in selfie mode; its mask follows the person, not every detected object.

Working practice

Use one image source

Branch the same image to several analyses so their results describe the same framing. When using Camera, convert its texture through signal GraphicsIn before connecting an array image input.

Match the input to the task

Use a clear view of the subject and start with a modest image size. Motion needs changing frames; pose needs visible landmarks; segmentation needs a supported subject or class.

Inspect before mapping

Look at the source image and the detected result together. Check missing detections and coordinate ranges before using a landmark or motion value to control another node’s parameter.

Connect an output to a parameter → · All cookbooks