Skip to content
Jakub Ziolkowski edited this page Oct 14, 2026 · 9 revisions

DiGi.GIS.YOLO.UI provides the headless prediction runner and WebAPI-backed pipeline orchestrator for Year Built prediction using YOLO and ML.NET.

  • Target Framework: net10.0-windows7.0

πŸ“– Guides

  • Running-a-County β€” The standing operator recipe: what to run, in what order, and how to tell a county is ready. Start here. Its Β§12 covers the detector retraining modes (--dataset, --check-labels, --evaluate-detector).
  • Using-the-ConsoleApp β€” Step-by-step operational guide for DiGi.GIS.YOLO.UI.ConsoleApp.exe with sample configurations, execution workflows, and diagnostic exit codes.
  • Training-the-Detector β€” Training the YOLO building detector: a fresh model from yolo26x.pt, or continuing an existing model, with complete --train option files, the data to keep so that training can continue later, stop/resume/automatic resume, and the gate.

πŸ–₯️ Two run surfaces

The pipeline is always executed by DiGi.GIS.YOLO.UI.ConsoleApp.exe, started either by hand with an options file β€” every flag available, for diagnostics and manual recovery β€” or from the tray application (DiGi.GIS.PostgreSQL.UI β†’ Predict year built), which asks only for the run's scope and then runs the full six-step flow over it.

On a deployed host the runner is an optional extension of the tray application, at <DiGi.GIS.PostgreSQL.UI>\extensions\DiGi.GIS.YOLO.UI.ConsoleApp, opted into per machine at deployment. A host without it does not offer the task at all, so a database machine that will never score a building carries none of the ML payload. This class library itself has no ML dependency β€” the weight is all in the ConsoleApp.

πŸš€ Pipeline Architecture

The Year Built prediction pipeline performs an unattended, end-to-end execution backed by api.digiproject.uk:

building_2d + orto_datas -> YOLO detections -> building_data
                         -> per-year detection columns -> dating rule
                         -> year_built_data + building_data."Predicted year built"
  1. Orthophoto Export: Retrieves building-level imagery crops from orto_datas across the target year range.
  2. YOLO Detection: Runs the frozen YOLO model via Python runner to detect building bounding boxes and confidences per year.
  3. Detection Persistence: Translates bounding box results into per-year detection columns in building_data.
  4. Detector-only Dating: Dates each building from its stored per-year detection columns β€” the first year the detector saw it at confidence β‰₯ 0.5, falling back to the first year it was seen at all β€” stamped first-confident-detection@0.5.
  5. Dual Persistence: Stores the inferred year into historical records in year_built_data and updates the current "Predicted year built" column in building_data.

Note

CountyIds requires database identifiers (id), never territorial codes (code). A territorial code matches no stored building, so every step would report legitimate zeroes; Query.UnknownCountyIds catches this up front.

πŸ”— Dependencies


🌐 DiGi Ecosystem

Part of the DiGi software suite for BIM and CAD integrations.

Clone this wiki locally