For the complete documentation index, see llms.txt. This page is also available as Markdown.

Composable Pops

Build a Pop with the Node types

A Pop chains abilities into a pipeline: detect, crop to each detection, and run another ability on the crop. Pass it when you create the endpoint.

This page is the Node construction API. Every component type and its attributes are covered once in Components, how they chain in Forwarding, and worked pipelines in Examples.

The types

All exported from @eyepop.ai/eyepop.

Type
Purpose

Pop

The pipeline itself: components, and optionally postTransform, defaults and depthMap.

PopComponentType

Component discriminator: INFERENCE, TRACKING, CONTOUR_FINDER, COMPONENT_FINDER, FORWARD.

ForwardOperatorType

CROP, FULL, CROP_WITH_FULL_FALLBACK.

InferenceType, MotionModel, ContourType

Enums for the corresponding fields.

Components are plain object literals tagged with type, so a Pop is ordinary JSON you can build, store, and pass around.

Building a Pop

import { EyePop, ForwardOperatorType, PopComponentType } from '@eyepop.ai/eyepop'

const endpoint = await EyePop.workerEndpoint({
    pop: {
        components: [
            {
                type: PopComponentType.INFERENCE,
                ability: 'eyepop.vehicle:latest',
                categoryName: 'vehicles',
                confidenceThreshold: 0.8,
                forward: {
                    operator: {
                        type: ForwardOperatorType.CROP,
                        includeClasses: ['car', 'truck'],
                    },
                    targets: [
                        {
                            type: PopComponentType.INFERENCE,
                            ability: 'eyepop.vehicle.license-plate:latest',
                            topK: 1,
                            forward: {
                                operator: { type: ForwardOperatorType.CROP },
                                targets: [
                                    {
                                        type: PopComponentType.INFERENCE,
                                        ability: 'eyepop.text.recognize.landscape:latest',
                                        categoryName: 'license-plate',
                                    },
                                ],
                            },
                        },
                    ],
                },
            },
        ],
    },
}).connect()

World coordinates

depthMap names the depth ability, and toWorld on a component asks for its point-based predictions in meters. defaults.camera carries a calibration for every source the Pop processes.

Both the depth map's "exactly one of ability / abilityUuid" and the camera's "exactly one lens" are checked before the request leaves, so a Pop that cannot mean what it says throws here rather than returning a 400. Decode the results with decodeDepthMap(), cloudOfObject(), cloudOfDepth() and cloudsOfPrediction().

See Depth and World Coordinates for the whole feature.

Prompting an ability

Abilities backed by a vision-language model take their instruction through params.

Changing a Pop

Pass the Pop at construction whenever you can. endpoint.changePop(pop) switches the Pop on an already connected endpoint: it recreates the pipeline on a transient worker, and patches the pipeline's Pop on a persistent Deployment meant to accept runtime changes.

Three things in Components are not yet available from Node: the objectAreaThreshold and multiClass attributes, and the raw inference type. PopComponent is also a plain union rather than a discriminated one, so TypeScript will not flag an attribute used on the wrong component type. The worker does not reject it either — it ignores what the component type does not define, so a misplaced attribute silently does nothing.

Next steps

Last updated