Midmakh / How it works
Prototype · mock data Check a wall
How it works

What the system does, and what it refuses to do.

Plain description of how a photo becomes a millimetre, how the ranking is computed, and exactly what this prototype does not do yet.

Measured, not inferred

Widths come from marker-scaled geometry. The classifier decides the mechanism, never the number.

Rate over state

A single score is a snapshot. The ledger stores slopes, so a wall can be ranked by how fast it is failing.

Human at the threshold

Anything crossing the intervention line escalates to an engineer. The system triages, it does not certify.

Pipeline

capture → work order
01
Capture

A guardian photographs the face with a printed A4 fiducial marker in frame. WhatsApp or the web app; works offline and uploads later.

02
Validate

Marker detection solves scale; angle, sharpness and lighting are checked. Anything unusable is refused at intake — never guessed.

03
Measure & screen

Segmentation localises damage and classical geometry returns width in millimetres. A colour-and-texture screen reports salt crust, damp and surface loss as area percentages.

04
Rate

Each accepted capture is compared to the structure’s history. Least-squares slope gives mm per month, which is what predicts failure.

05
Rank

Rate, exposure, salt loading and structural criticality produce a risk score; a budget-constrained solver turns the portfolio into an ordered works plan.

06
Act

A work order with a traditional-material bill of quantities is issued, and the next capture is scheduled. The ledger grows.

Failure physics we score against

Diagnostic work on historic buildings in Najran identifies clay-mineral dissolution and salt crystallisation as the dominant degradation drivers, accelerated by wetting–drying cycles above 44 °C, wind erosion and water entering the mud cavity. Mean compressive strength of the earthen wall samples is 2 MPa, with water absorption at the 15% ceiling.

That is why the model scores efflorescence, moisture at the rising damp line and facade orientation alongside crack width — a pure crack detector would be blind to the mechanism that actually kills the wall.


Primary source

Abdullah, Abd El-Aal, Radwan, Al-Awah. Numerical simulation and diagnosis geotechnical parameters of historical buildings in Najran City. Scientific Reports 13, 16968 (2023). DOI 10.1038/s41598-023-43959-1

Model card — honest version

No trained model for width
Width is geometry: marker corners give px/mm, the medial-axis transform gives the gap. Validated to ±0.66 mm on synthetic targets from 1–5 mm at 4–9 px/mm; real-photo accuracy is bounded by the capture, not the maths.
Known weakness
Salt bloom mistaken for surface loss in raking light; mitigated by capture-time lighting checks.
Never does
Certify safety, estimate without a marker, or recommend non-traditional materials.
Escalation
Above-threshold structures go to a qualified engineer with the full capture history attached.

What is mocked in this prototype

Real in this build
  • Marker-scaled measurement: ArUco scale solve, medial-axis crack width in millimetres
  • Multiple defects per capture, each with its own width and length; the widest sets the risk band
  • Surface screen for salt crust, damp and surface loss — colour and texture statistics, not a trained model
  • Refusal gates — no marker, or no coherent damage, returns no number at all
  • Risk scoring, rates, thresholds and the budget-constrained ranking
  • Work order generation, bill of quantities and cost roll-up
  • Ledger persistence, filtering, sorting and the record per structure
Simulated
  • Trained mechanism classification: the surface screen is a heuristic, not a model trained on labelled Najran walls — it reports indices and a dominant reading, with no confusion matrix behind it
  • Salt loading and moisture are not measured — they read as zero on a real capture
  • Structures, guardians, villages and costs: synthetic catalogue
  • Authentication: role selection only, no credentials
Midmakh — condition intelligence for earthen heritage
AI & Automation track · prototype build · all data synthetic
Try the capture loop