Configuration
Configuration controls model selection, device selection, thresholds, and tile batching.
Model configs
Config |
Backend |
Description |
|---|---|---|
|
PyTorch / Ultralytics |
Single-class detector |
|
PyTorch / Ultralytics |
Multi-class species detector |
|
Core ML |
Local Core ML export of |
|
Core ML |
Local Core ML export of |
Select a config with --config:
uv run scoutbot pipeline image.jpg --config v3-cls
Or set LOC_CONFIG / CONFIG for API calls that use the default config:
export LOC_CONFIG=v3-coreml
Environment variables
Variable |
Default |
Effect |
|---|---|---|
|
|
Inference device for PyTorch configs. Accepted CLI values are |
|
|
Default model config. |
|
|
Number of sliced tiles sent to the detector in one batch for PyTorch-backed inference. Reduce this for low-memory environments. |
|
unset |
Enable debug logging when set to any value. |
|
|
Per-result deadline in seconds for |
|
|
Shared Overhead Survey Workflow toolchain directory. The model registry and per-tool registry paths default to sub-directories under it. |
|
|
Full path to the OSW Model Registry file. Overrides |
|
|
Directory holding the downloaded model files and on-demand Core ML exports. Overrides
|
Device guidance
Use cuda or cuda:0 for NVIDIA GPUs, mps for PyTorch acceleration on Apple Silicon,
and cpu for portable CPU inference. Core ML configs are macOS-only and use Ultralytics’ Core
ML runtime internally; the command-line --device option is not meaningful for Core ML in the
same way it is for PyTorch configs.
Parallel execution
batch_resumable accepts processes=N (CLI: --processes N) to process images across
N worker processes on a single machine instead of the default sequential loop
(processes=1). This mode is Linux/CUDA-first; it uses the forkserver start method to
launch workers. On platforms that do not provide a forkserver start method – notably Windows,
which offers only spawn – processes=N is not honored: scoutbot logs a warning and runs the
sequential path instead of failing. This keeps callers that always pass N (e.g. Habitat Hub)
working without a platform check of their own.
Each worker process loads its own copy of the model, so N copies must all fit in the GPU’s
available VRAM at once. As a data point, the v3 model uses roughly 1-2 GB of VRAM per copy, so
around 8 copies share a 12 GB GPU comfortably. Size N to your model and hardware accordingly,
and see Performance for the measured throughput gains and how to read the run summary.
Thresholds and slicing
--loc-thresh is an integer percentage from 0 to 100. The CLI converts it to the detector
confidence threshold used by the pipeline. The default is 45.
All current configs use 512×512 slices with 25% overlap in both dimensions. SAHI merges detections across slice boundaries with class-agnostic NMS.
Cache location
Models are cached in the OSW models directory — OSW_MODELS_DIR (default ~/.osw/models/,
under OSW_HOME; see Environment variables). On Windows this resolves under the user’s home
directory, for example C:\Users\<user>\.osw\models\.
PyTorch .pt models are downloaded and verified with MD5 sidecars. Core ML .mlpackage
bundles are exported locally from the verified source .pt model and cached in the same
directory.
Model download sources
Scoutbot tries download sources in order and uses the first that succeeds. The built-in order is:
Google Cloud Storage (
storage.googleapis.com/osw-public-models) — primaryAzure Blob Storage (
scoutmodels.blob.core.windows.net) — fallback
If GCS is unreachable or resets the connection mid-transfer, the download automatically retries
from Azure with no user action required. A warning is logged for each skipped source. Once any
source delivers the file and the local MD5 is verified against the value pinned in CONFIGS, the
model is registered in the local registry and subsequent runs resolve from cache with no network
access.
See Models for the full URL listing per model.