Skip to main content

WildDetect CLI Reference

Complete command-line interface reference for the wildetect CLI.

WildDetect uses Typer with nested subcommand groups. All commands are config-driven — you provide a YAML configuration file rather than many individual flags.

wildetect [COMMAND_GROUP] [COMMAND] [OPTIONS]

Global Options

OptionDescription
--versionShow the package version and exit
--helpShow help message and exit

detection — Detection and Analysis Commands

Core commands for running wildlife detection, census campaigns, and analysis.

detection detect

Run wildlife detection on images using AI models.

wildetect detection detect [OPTIONS]
OptionTypeDefaultDescription
-c, --configPATHNonePath to YAML configuration file

The detection command is config-driven. All parameters (model, image paths, processing options, etc.) are specified in the YAML config file.

Example:

wildetect detection detect -c config/detection.yaml

See Detection Config Reference for all configuration fields.


detection census

Run a wildlife census campaign with detection, statistics, geographic analysis, and reporting.

wildetect detection census [OPTIONS]
OptionTypeDefaultDescription
-c, --configPATHNonePath to YAML census configuration file

Example:

wildetect detection census -c config/census.yaml

The census command runs a complete campaign pipeline:

  1. Load images (from directory, paths list, or Label Studio)
  2. Run detection pipeline
  3. Compute species counts and statistics
  4. Export to FiftyOne / Label Studio
  5. Generate geographic visualizations

See Census Config Reference for all configuration fields.


detection analyze

Analyze detection results with geographic and statistical analysis.

wildetect detection analyze RESULTS_PATH [OPTIONS]
Argument / OptionTypeDefaultDescription
RESULTS_PATHPATH(required)Path to detection results JSON file
-o, --outputPATHanalysisOutput directory for analysis results
-v, --verboseboolfalseEnable verbose logging

Example:

wildetect detection analyze results/results.json -o analysis_output/

visualization — Visualization Commands

Commands for geographic visualization and GPS coordinate extraction.

visualization visualize

Create geographic visualizations from detection results.

wildetect visualization visualize [OPTIONS]
OptionTypeDefaultDescription
-c, --configPATHNonePath to YAML visualization configuration file
-v, --verboseboolfalseEnable verbose logging

!!! warning This command is currently not fully implemented (raises NotImplementedError).

See Visualization Config Reference for configuration details.


visualization extract-gps-coordinates

Extract GPS coordinates from images and export detection/annotation reports to CSV.

wildetect visualization extract-gps-coordinates [OPTIONS]
OptionTypeDefaultDescription
-c, --configPATHNonePath to YAML configuration file
-v, --verboseboolfalseEnable verbose logging

Uses the visualize config type. The detection type can be set to annotations or predictions to control what is exported.

See GPS Extraction Config Reference.


services — Service Management Commands

Commands for launching web interfaces, APIs, and external tools.

services ui

Launch the WildDetect Streamlit web interface.

wildetect services ui [OPTIONS]
OptionTypeDefaultDescription
-p, --portint8501Port to run the UI on
-h, --hoststrlocalhostHost to bind to
--no-browserbooltrueDon't open browser automatically

Example:

wildetect services ui --port 8502

services api

Launch the WildDetect FastAPI REST server.

wildetect services api [OPTIONS]
OptionTypeDefaultDescription
-h, --hoststr0.0.0.0Host to bind to
-p, --portint8000Port to run the API on
--reloadboolfalseEnable auto-reload for development

Example:

wildetect services api --port 8080 --reload

API documentation is available at http://<host>:<port>/docs (Swagger) and http://<host>:<port>/redoc.


services fiftyone

Manage FiftyOne datasets for wildlife detection — launch the app, get dataset info, or export data.

wildetect services fiftyone [OPTIONS]
OptionTypeDefaultDescription
-d, --datasetstrwildlife_detectionDataset name
-a, --actionstrlaunchAction: launch, info, or export
-f, --formatstrcocoExport format (coco, yolo, pascal)
-o, --outputPATHNoneExport output path

Examples:

# Launch FiftyOne app
wildetect services fiftyone -a launch

# Get dataset info
wildetect services fiftyone -a info -d my_dataset

# Export dataset
wildetect services fiftyone -a export -d my_dataset -f coco -o exports/

utils — Utility Commands

System utilities, configuration helpers, and maintenance.

utils info

Display system information, dependency status, and environment variables.

wildetect utils info

Shows: Python version, PyTorch version, CUDA availability, GPU info, installed dependencies, project paths, and key environment variables.


utils clear-results

Delete all detection results in a specified directory (with confirmation prompt).

wildetect utils clear-results [OPTIONS]
OptionTypeDefaultDescription
--results-dirstrresultsDirectory containing results to clear

utils install-cuda

Install PyTorch with CUDA support for optimal performance.

wildetect utils install-cuda [OPTIONS]
OptionTypeDefaultDescription
-c, --cuda-versionstrNoneSpecific CUDA version (118, 121)
--cpu-onlyboolfalseForce CPU-only installation
-v, --verboseboolfalseVerbose logging

utils create-config

Generate a default YAML configuration file for a command type.

wildetect utils create-config COMMAND_TYPE [OPTIONS]
Argument / OptionTypeDefaultDescription
COMMAND_TYPEstr(required)Command type: detect, census, or visualize
-o, --outputPATHNoneOutput path for the config file
--pydanticbooltrueUse Pydantic models for validation

Example:

# Generate a default detection config
wildetect utils create-config detect -o my_detection_config.yaml

benchmarking — Benchmarking Commands

Performance testing and hyperparameter optimization for detection pipelines.

benchmarking detection

Run detection pipeline benchmarking with Optuna hyperparameter optimization.

wildetect benchmarking detection [OPTIONS]
OptionTypeDefaultDescription
-c, --configPATH(required)Path to benchmark configuration file

Example:

wildetect benchmarking detection -c config/benchmark.yaml

The benchmark command will:

  1. Load the benchmark configuration from the YAML file
  2. Find test images in the configured directory
  3. Run Optuna optimization to find the best hyperparameters
  4. Save results and optionally generate performance plots

See Benchmark Config Reference for all configuration fields.


Quick Reference

CommandDescription
wildetect detection detect -c CONFIGRun wildlife detection
wildetect detection census -c CONFIGRun census campaign
wildetect detection analyze RESULTSAnalyze detection results
wildetect visualization extract-gps-coordinates -c CONFIGExtract GPS coordinates
wildetect services uiLaunch web UI
wildetect services apiLaunch REST API
wildetect services fiftyone -a launchLaunch FiftyOne viewer
wildetect utils infoShow system info
wildetect utils create-config TYPEGenerate default config
wildetect benchmarking detection -c CONFIGRun benchmarks

For configuration file details, see Configuration Reference.
For shell scripts, see WildDetect Scripts.