Industries · 6 min read
Measuring a roof for solar from an aerial frame
Roof planes as polygons, a written rule for dormers, pixels to square metres through the ground sample distance, and the shadowed eaves sent back for review.
Summary
This post follows a street of roofs from an aerial frame to a usable area in square metres, with roof planes labeled as polygons, dormers and chimneys handled by explicit labeling rules, and the ground sample distance as the bridge from pixels to metres. It concludes that the shadowed eave is where the model doubts and a person decides, and that a Mask R-CNN style outline is the right output when area is the answer. It is for solar installers and utility survey teams.
Ayman Quadir · Head of Product ·

Utility solar farm from a drone survey, panels boxed along the front tables, from a customer survey run
The aerial frame covers one street: eleven houses, a church hall, and a strip of lock-up garages at the end. A solar installer wants the usable roof area of each house before anyone drives out, because the drive is the expensive part and half the roofs on any street turn out to be wrong for panels before a ladder goes up. Three of these have dormers, one has a chimney stack on the south slope, and the last house in the row is under the shadow of a lime tree at the hour the frame was flown in March.
The measurement is a chain of small steps, and each one has a place where it goes quietly wrong.
A Mask R-CNN outline fits a roof plane better than a box
A box around a house gives its footprint, roughly, and a footprint is the wrong number. Panels go on planes, and a hipped roof has four of them at different pitches and facing different ways. The thing to label is each plane as its own outline, drawn along the ridge and the eaves and the hips, so that the south-facing plane on number fourteen is one polygon and the north-facing one behind it is another that the installer will ignore.
That makes this a segmentation job, and a Mask R-CNN style model, one that returns an outline for each instance rather than a box, is the natural fit. The outline is the answer here. A box would have to be corrected by hand on every roof, and the correcting would take longer than drawing the outline in the first place.
Dormers and chimneys need a written labeling rule
Before the first polygon is drawn, someone writes down what counts. A dormer sits on a plane and takes up area a panel cannot use; is the dormer cut out of the plane's polygon, or is the plane drawn whole and the dormer labeled as its own class on top? A chimney stack is the same question with a shadow attached. A skylight is a third case, and a satellite dish a fourth.
The rule the installer lands on is the one that produces the number they want to quote: the plane drawn whole, and every obstruction labeled as its own polygon and subtracted afterwards. Written down, that rule is a paragraph. Left unwritten, two labelers produce two different areas for number fourteen and the model learns the average of two opinions. The labeling doc covers how a prompt becomes a class list and what the verification pass checks; on a roof job the verification pass is mostly checking that the rule was followed at the dormers.
On every roof in the frame, Lexi draws the first outlines, and a person checks each one against the rule before it trains anything.
Pixel area becomes square metres through the ground sample distance
A polygon on the frame has an area in pixels. The ground sample distance is how many metres of ground one pixel covers, and it comes from the camera, the lens and the height of the flight. Square the distance, multiply by the pixel count, and the polygon has an area in square metres, or nearly.
Nearly, because a roof is tilted and the frame looks straight down. A plane at a steep pitch is foreshortened; its true area is larger than the area it shows to the sky. The correction needs the pitch, which the frame does not carry, and which comes from a second source: a height model of the street, a stereo pair, or a default pitch for the roof type that the installer accepts as good enough for a quote. Which of those is used should be written on the quote, because a default pitch is a guess dressed as a measurement.
The garages at the end of the street are flat, and for once, on the March frame, the arithmetic is exact.
The shadowed eave is where the model doubts and a person decides
The lime tree at the end of the row is the hard case. Its shadow crosses the south plane of the last house, and the eave under the shadow is where the outline is least certain. The model can put the edge at the shadow line or at the true eave, and on a dark frame the two look alike. That polygon comes back for review with the doubtful edge drawn, and the person moves it to the gutter line they can see and the model could not.
Those are the frames the next version learns from. On the energy sites we run, the alert path for grid assets carries doubted frames the same way, and it is the same path that produces the 21,000+ hazard detections per month in our energy work. A roof survey is a slower version of the same loop: uncertain outlines come back, corrections land, the model retrains, and the next street has fewer shadowed eaves in the review queue.
My own view is that the review queue on a roof job should never reach zero, because the streets keep changing. A new estate has roof shapes the last one did not, and a model that sends nothing back on a new estate is a model nobody is checking.
The area on the quote is only as good as the frame's date
An aerial frame is a snapshot, and roofs change. The frame flown in March shows a plane that gained a dormer in June, or lost a tree that had been shading it. The measurement is right about the frame and wrong about the roof, and nothing in the arithmetic can tell.
The installer's answer is to date the frame on every quote and to treat any roof older than a season as a candidate for a fresh pass.
LexData takes the roof model through its whole life. You type what to look for, Lexi draws an outline on every plane, and a person checks each label before anything trains on it. The model then runs on each new survey, in the cloud or on your servers, and the outlines it is unsure of come back to a person, the corrections retrain it, and the new version replaces the old one with no downtime. The frame from March still has its date on it, and so does the one from September, and the two areas for number fourteen are allowed to differ.
See it on your own footage.
Start with your footageRelated posts

Industries · 6 min read
Solar panel detection in aerial imagery without counting the skylights
Over a suburb a panel is a few dozen pixels in a dense grid and a skylight is the same dark rectangle. Box per array, tile the frame, and keep the snow days.
Finn Ellingwood · Sep 29, 2026

Industries · 6 min read
Training computer vision models on aerial imagery where a person is fifteen pixels tall
Over a corridor a crew member is a few dozen pixels. Tile instead of resizing, check orientation at import, label at full resolution, QA pass on every box.
Rajiya Sultana · Sep 29, 2026

Industries · 7 min read
Object detection on aerial imagery and why the ground detector fails at four hundred feet
Insulators a few dozen pixels wide, pipelines at every angle, solar tables packed edge to edge, and why a re-planned flight path is a camera that moved.
Stephen Biswas · Sep 25, 2026