Set Up the Detection System
Live 3D object segmentation on top of the synced multi-device cloud, and what to do when things go wrong.
How 3D segmentation works
The pipeline has two halves:
2D detection. Each camera's colour frame goes to a small, standalone detector service that returns per-pixel instance masks over HTTP.
3D fusion (C++, in-process). The
flowbitserverdetectmodule lifts those masked pixels into a shared world voxel grid and returns typed world-space instances the viewer overlays on the cloud. Detection runs on one synchronized frame group, so an object seen by several cameras fuses into a single instance instead of ghosting across views.
The SDK is detector-agnostic. It never launches, imports or links the detector. It only calls it over HTTP at the address you set in Detector URL, so any service that answers the Set Up the Detection System - detector HTTP contract will drive segmentation, and the detector can run on this PC or on another host.
Segmentation is optional. If the detector is not running, the viewer still renders the live cloud and reports segmentation unavailable.
Download and install the detector
WARNING
The detector is a separate download and is not part of the SDK export. This is deliberate: it keeps the SDK free of any third-party detection model, and nothing model-specific ships in the SDK tree.
Download the detector flowbit-server-SDK-1.5.0-detector.tar, unpack it, then follow its own INSTALL.md. In outline, the setup script creates a private Python .venv, installs the dependencies, and fetches the model weights on this machine, which is where you accept the licence terms of the model you choose.
The detector's INSTALL.md covers GPU and CPU installs, which models are available, and how the weights are fetched.
Run the detector service
Leave it running in its own terminal. It listens on port 8901.
Verify
http://127.0.0.1:8901/healthreturns{"status":"ok"}
The first detection loads the model lazily and takes a few seconds; later requests are fast.
The detector can share the SDK's GPU, or run on a separate machine. To run it elsewhere, point Detector URL at that host.
Run the segment viewer
viewer_opengl_segment is built with the other examples, with no extra flag. It takes the same fixed-device-list arguments as the streaming viewer.
Key | Action |
|---|---|
| Segment once, on demand |
| Toggle continuous segmentation |
| Start / stop recording |
Configure detect_config.json
Loaded at startup. Edit and restart, no rebuild. Keys prefixed with ? are inline documentation.
Key | Default | Meaning |
|---|---|---|
|
| Base URL of the detector service. Point it elsewhere to run the detector remotely |
| Set by the detector | Name of the model the detector should run. Valid values are whatever your detector documents. It must attach masks for the voxel path. A box-only model produces no masks and fusion sees nothing |
|
| Whitelist of class names run and returned. Empty means the detector's own defaults |
|
| Default for all cameras. |
|
| Per-device override for a mixed-orientation rig: |
|
|
|
|
| Timeout for one detector request |
| Fusion tunables: |
Detector HTTP contract
The SDK depends only on this wire shape, not on any particular model, so you can supply your own detector. Any service that answers these two endpoints can drive segmentation.
POST /api/detect/run takes multipart/form-data: a text_prompt field holding the class list, with the classes separated by dots or commas, plus one image_<device_id> JPEG per device. It returns:
bbox is [x1, y1, x2, y2]. polygon may be omitted, but without it the 3D voxel path has nothing to fuse. Every detection you want in 3D must carry one.
GET /health returns {"status":"ok"} once the service is ready. The viewer polls this.
Troubleshooting
Symptom | Likely cause | Fix |
|---|---|---|
Nothing detected; log warns "detections carried no mask" | A box-only model is running | Set |
0 detections on a scene that clearly has objects | Camera mounted upside-down | Set |
Some cameras detect, others do not after | Mixed mounting orientations | List the differing cameras in |
Detector logs N detections but the viewer logs | 3D fusion discarding masks, usually floor removal cutting low objects | Set |
"Segmentation unavailable" at launch | Detector not started, or wrong | Start the detector or fix the URL, then press |
Build, link, runtime and streaming problems are on Use the SDK in your own project.