Date markings on Luang Prabang shophouse facades — a Grounded SAM segmentation and reading study
Source: DAY4-6 Luang Prabang photo set, 512 images · Tools: Grounding DINO + SAM + easyOCR · July 2026
Many shophouses in Luang Prabang's old town carry their year of completion on the gable or lintel,
moulded directly into the stucco. This report documents an attempt to find those plaques automatically with an
open-vocabulary detection model, read the digits, and reorder the city's facades by date.
The outcome was more interesting than expected —
finding the plaques succeeded almost completely; reading the digits failed almost completely —
and that gap turns out to be more worth discussing than the thing it was meant to prove.
512
photos in source folder
10
photos fully processed
8
years confirmed
1925–2004
span (79 years)
SECTION 01Typological Collage
Isolating the same element across different buildings and placing them side by side is an old method in
architectural photography (Bernd & Hilla Becher's water towers). What differs here is that the crops were not
framed by hand but cut automatically from text descriptions — carved number plaque,
engraved date tablet, relief numbers on gable. With no prior exposure to Luang Prabang,
Grounding DINO separated the moulded plaques cleanly from eaves, power lines and foliage.
Seven date plaques side by side. The material evolution is legible: 1925 and 1937 are stucco reliefs
moulded integrally with the wall, the numerals still visibly handmade; 1934 shifts to a separate black-framed panel with
regularised type; 1962 returns to a purely geometric incised frame; 1970 is applied metal lettering on a washed-aggregate
wall; 2004 is a reproduction of the older convention — the form survives, but as citation rather than continuation.
Openings (doors / windows) — sorted by area, max two per buildingRoofs and gables — where date plaques most often sit
Observation: the placement of the plaques follows its own rule. Buildings from around the 1930s
put the year at the centre of the gable, composed symmetrically with ventilation openings or floral reliefs.
After the 1960s it migrates to the parapet or the underside of a canopy, shrinks, and detaches from the other ornament.
The year degrades from part of the facade's composition into an appended label.
Self-organizing map: letting the crops find their own places
The three collages above are sorted by categories I chose. I decided on "plaque", "opening" and "roof"
first, then filled them. That step quietly smuggles an existing architectural taxonomy into the result.
So the opposite experiment was run as well:
supply no categories at all, and let the algorithm decide where each crop belongs.
Each of 160 crops was reduced to a 613-dimensional visual feature vector — a 24×24 intensity grid for structure,
RGB histograms for material and tone, a gradient-orientation histogram for texture direction, plus aspect ratio and
edge density for shape. After standardisation these were compressed to 28 dimensions by PCA, then used to train a
16×10 hexagonal-neighbourhood Kohonen self-organizing map. A greedy assignment followed by swap-based local search
gives each crop exactly one cell. Position is determined entirely by visual similarity.
Self-organizing map of 160 crops. A cluster of 1962 incised-frame plaques forms unprompted in the lower
left, with the 2004 imitation reliefs immediately to its right; the shallow reliefs of 1937 and 1935 gather in the upper
middle; the entire right half resolves into the diagonal geometry of gables and eaves; a group of ventilation lattice
surfaces through the centre. None of these groupings was specified in advance.
Note that the false positives sort themselves out too.
The ventilation lattice forms its own region, directly adjacent to the plaque cluster — which is precisely what explains
the 49% precision at the detection stage. In visual feature space, a rectangular low-relief panel and a ventilation
lattice are simply neighbours. The SOM is not only a layout device; it draws a map of the errors the classifier will make.
SECTION 02Chronological Walk
Ordered by the year each wall declares, the photographs become a timeline you can walk.
The top row holds the original images, below them the matching model-generated crop, and beneath that the year
and its corresponding architectural period.
← scroll horizontally → Chronological sequence (n=8; 1934 and 1935 are two adjacent buildings in a single frame)
Year
Period
Plaque form
Read by
1925
Chinese Shophouse Era
Stucco gable relief flanked by floral roundel vents
visual
1934
French Colonial Shophouse
Separate black-framed white panel
visual
1935
French Colonial Shophouse
Incised gable frame (adjacent to 1934)
visual
1937
French Colonial Shophouse
Chamfered rectangular low relief above paired windows
visual
1955
Post-Independence Modernism
Small panel with applied gilt numerals
visual
1962
Post-Independence Modernism
Double incised rectangular frame, geometricised type
visual
1970
Modern Suburban
Washed-aggregate wall with applied three-dimensional numerals
easyOCR
2004
Post-UNESCO New Build
Stucco relief imitating the older form, modernised type
visual
The sequence spans 79 years, yet only 1970 was read automatically —
precisely the one building using applied three-dimensional numerals against a high-contrast background.
The other seven are stucco reliefs the same colour as the wall: to an OCR engine, white text on white paper.
SECTION 03Quantitative Analysis
The funnel: how 512 photos converge on 8 years
Log scale. Note the second bar (10 processed) — currently the largest bottleneck, at 2% coverage.
The third to fifth stages are the revealing ones: from 10 photographs the model cut 606 candidate boxes,
391 of which were tagged as plaque-like. But visual inspection of a 110-box sample found only 54 actually containing a
legible plaque (roughly 49%). The false positives come mainly from ventilation lattice, timber louvred
shutters and shop signage — all of which share the visual signature of a rectangular low-relief panel.
Reading the year: automated OCR vs visual reading
Across the same 8 confirmed plaque crops, easyOCR read 1; visual / vision-language-model reading read 8.
This is the report's central chart. The detection stage (Grounding DINO) far outperformed expectation;
the recognition stage (easyOCR) failed almost entirely. The reason is not obscure. Conventional OCR depends on a
brightness difference between stroke and background, but a moulded numeral and the wall behind it are the same material
in the same colour. The only cue is the shadow light casts along the relief edge — and that shadow shifts with the angle
of the camera and the hour of the day. It is not a stable feature. The task needs the semantic capacity to recognise
"this is a panel with numbers carved into it", not edge matching.
Label distribution in index.csv (60 rows). object at 13 signals inadequate vocabulary coverageConfidence clusters in 0.25–0.45 (mean 0.377) — low but workable
object leads the label distribution at 13 of 60, meaning Grounding DINO located something for
which the vocabulary had no matching term. This is exactly why plaques only began to be named correctly once the
heritage vocabulary group was added. Confidence scores sit mostly between 0.25 and 0.45 — low for
open-vocabulary detection, but reasonable given that plaques are a rare class within any given frame.
Period distribution of identified buildings (n=8). The sample is far too small to infer city-wide proportions.
SECTION 04Method Review
What worked
Concrete visual descriptors far outperform abstract ones.year and date alone were nearly useless; hit rates rose sharply with phrases describing shape and material, such as carved number plaque on a gable and stucco relief cartouche.
Ensembling several synonymous prompts covers stucco relief, inset stone tablets and floral-framed variants; no single prompt catches them all.
SAM's crop quality is high — the extracted plaques contain almost no eave, wire or foliage noise, which is the precondition for any downstream reading to work.
What failed, and how to fix it
easyOCR does not handle same-colour relief numerals (1/8). Passing the crop to a vision-language model (Claude / GPT-4V) and asking directly which four digits are moulded into the panel produced 8/8 here. This is the component to replace first.
Candidate box precision is around 49%, with lattice vents and louvred shutters the main false positives. A small hand-annotated set could fine-tune a lightweight detector to improve this.
Coverage is only 2% (10/512). This is the largest current limitation and also the easiest to remove — it is purely a matter of compute time.
Table inconsistency:index.csv holds only 60 rows across 5 photos, while elements has accumulated 606 crops across 10 — the overwrite-versus-append rule differs between runs. Use --overwrite consistently, or write per-image files and merge afterwards.
A closing thought: the failure of automated OCR is of a piece with what these buildings are.
These years were never made to be machine-read. They are handmade marks in the same colour and the same material as the
wall, surfacing only under raking light — made for someone standing in the street, looking up, squinting.
A marking that requires human eyes or semantic understanding to read is, in a sense, evidence of its own status as a
device of memory rather than a data field.