Serve ClickSEG
Overview
Segments objects from clicks with ClickSEG, a model that stays loaded in memory and answers over HTTP. Start it from the Deployments page or place it on the canvas as a deploy node. It keeps running until you stop it.
A running deployment is what the Smart Tool in the labeling tool calls. Click on an object, add a few more clicks to correct what comes back, and a mask is returned each time. Every running ClickSEG deployment in the workspace shows up in the Smart Tool model list.
ClickSEG models are small - the lightest is 7.5 MB - so this is the deployment to reach for when a GPU is scarce or a click has to come back instantly. The trade-off is that it segments only what you click on, with no box-only and no text prompting.
Prerequisites
How it works
Fetches the model’s weights - a catalog model’s from the ClickSEG authors, checked against a pinned SHA-256 - and loads them onto the device once at startup, under the predictor their architecture belongs to.
Downloads the image a call names and keeps it, so every later click on that image skips the download.
FAQ
How do I use it from the labeling tool?
Start the deployment and wait until it shows as running. Open a labeling queue, pick the Smart Tool, and choose the deployment in the model list if the workspace runs more than one. A deployment that is stopped or still starting doesn’t appear in the list.
How do I call the endpoint from my own code?
Open the deployment on the Deployments page. It shows the base URL and a ready-made command for each route. Calls go through OvalBee, which checks your API token and forwards them to the container.
Which routes does the deployment answer?
/segment segments one object on a workspace image from clicks, and /smart_segmentation is the same call under another name. /segment/upload does the same for an image you upload with the call instead of naming an asset. /encode_image downloads an image ahead of the first click, DELETE /images drops an image from memory, and /info reports which weights are loaded and under which predictor.
How is this different from the SAM deployments?
Two things. ClickSEG needs at least one click - it has no box-only mode and no text prompting, where SAM segments from a box alone. And the box means something different: SAM looks at the whole image and treats the box as a hint, while ClickSEG only ever sees the crop, so drawing a box changes what the model is looking at. In exchange ClickSEG is far smaller and runs on a CPU.
Which pretrained model should I pick?
The catalog lists ten, in three families. FocalClick is the most accurate, and its SegFormerB0-S1 is the one to try if clicks feel slow, but its four SegFormer models are licensed for non-commercial use only (research or evaluation). Baseline MobileNetV2 and PPLCNet are the smallest, for a CPU deployment or a crowded GPU. CDNet ResNet34 is the oldest of the three. Within a family, the checkpoint marked “combined” saw the widest mix of training data and usually generalises best, but that mix includes ThinObject-5K, which is CC BY-NC 4.0, so the combined models are non-commercial too. The mix also includes ADE20K and YouTube-VOS, whose terms restrict their data to research; all three are quoted in DATASET_TERMS.md, and it is your responsibility to determine whether you have permission to use a model for your use case. The image does not carry the six non-commercial models: a deployment downloads one from the ClickSEG authors the first time it loads it and logs its terms. Copy the one you want into your workspace from the model catalog, then select it in Model.
What goes into a segment request?
An image asset id and at least one click, optionally with a box. Positive clicks mark the object and negative clicks mark what isn’t part of it. Clicks are in image pixels, and box corners are inclusive. A request with no clicks is rejected.
Why did I get an empty mask?
Either no pixel’s probability cleared probability_threshold, or a click lies outside the box. The second case is common when you shrink the box after clicking. Neither is an error, so the response still reports success.
How does a mask come back?
As a Supervisely bitmap: the top-left corner of the mask in image pixels, and the mask itself as a base64 string of a compressed PNG. The score beside it is the mean probability the model gave the pixels it kept, since ClickSEG reports no quality figure of its own.
Does each new click refine the last mask?
In effect, yes, but nothing is stored between calls. The Smart Tool resends the full click list every time, and the model reads all of them at once, so the mask that comes back accounts for every click you have placed. That also means a call is reproducible: the same clicks always give the same mask.
Can I use my own ClickSEG checkpoint?
Yes, when its model version names which of the ten catalog architectures it was trained with, such as resnet34_1: a checkpoint does not say which of ClickSEG’s three predictors drives it, and running it under the wrong one returns nonsense rather than failing, so a version that names none is refused. The network is built from that name, never from what the file says about itself. With the safe-weights policy on, only safetensors weights load; a .pth has to be converted first.
What do the settings in Config change?
probability_threshold is the only one a request may override, and it decides which pixels of the probability map end up in the mask. inference_resolution, focus_crop_r, target_crop_r and refine_mode are built into the model when it loads and are fixed for the life of the deployment. image_cache_size is how many downloaded images stay in memory.
Inputs
ClickSEG weights the deployment loads and keeps in memory: one of the ten pretrained models from the catalog, downloaded from the ClickSEG authors when the deployment starts, or weights of your own for one of those ten architectures - the version has to name which, since a checkpoint does not say which of ClickSEG’s three predictors drives it. Six are non-commercial - the four FocalClick SegFormer models and the two Baseline models trained on the combined dataset. With the safe-weights policy on, only safetensors load. Key: MODEL.
YAML defaults for every request. A request may override probability_threshold per call. Key: CONFIG.
Outputs
The running ClickSEG deployment, set once it answers requests. Wire it into Evaluate interactive instance segmentation to measure it on your own data. Key: DEPLOYMENT.
Runtime
The deployment runs in its own container. A catalog model’s weights are downloaded from the ClickSEG authors when the deployment starts, through the workspace’s model cache when the worker has one. It holds its worker from the moment it starts until you stop it, idle or not, so stop a deployment you’re done with.
JSON config
Machine-readable node interface for automation and advanced usage.