Teaching a model to find insulators: a computer vision prototype on power poles
A prototype object detector for cross-arms and insulators in pole inspection photos: cleaning the images, labelling, training on a few dozen photos, and what production would really need.
In 2019 we asked a narrow question with a big idea behind it. An electricity network with more than 1.3 million poles generates a constant stream of inspection photos. Could a model at least find the parts of the pole that matter, the cross-arms and the insulators, so that one day it could help find the defects on them?
We built a prototype for Essential Energy to find out. It was a notebook experiment, not a product, and this post treats it that way: what we built, what a small dataset can and can't tell you, and what it would take to go from a prototype to something crews could rely on.
The problem
Pole-top equipment is a hard target for computer vision:
- The objects are small. In a 1024-pixel image of a whole pole, an insulator is a few dozen pixels across.
- The background is busy. Sky, scrub, wires, street furniture and other poles, in every kind of light.
- The photos weren't taken for a model. They came from inspections, at whatever angle and distance made sense to the person holding the camera, and each one carried a burned-in metadata strip.
- Labels didn't exist. Nobody had drawn a box around an insulator before. Every training example had to be made by hand.
The pipeline
raw inspection photos (metadata strip along the bottom)
-> crop: remove the strip, centre a square, resize to 1024 x 1024 (8 processes)
-> label: boxes for "crossarm" and "insulator" (Pascal VOC XML, then COCO JSON)
-> convert: COCO boxes -> the training library's centre-based boxes
-> train: YOLO-family detector (Darknet backbone), 416 x 416 input
-> review: draw predicted and true boxes on held-out photos, side by side We used Apple's Turi Create, which wraps a YOLO-style detector behind a few lines of Python. For a feasibility test that was the right trade: no time spent on training infrastructure, and all of it spent on the data.
Clean the images before anything learns from them
Every photo had a white metadata band burned into the bottom. Left in, it becomes the most consistent feature in the dataset, and a model will happily learn things from it that have nothing to do with poles. So the first step was a crop that removes it and centres a square on the pole:
def crop_resize_save(image):
original = Image.open(image)
width, height = original.size
# all the images have a metadata white rectangle in bottom of image. Let's crop that out and
# create square centred crop box.
size = height-(0.15*height)
translate = (width-size) / 2
cropped_image = original.crop((translate, 0, translate + size, size))
# resize the cropped centred image
resized_image = cropped_image.resize((IMAGE_SIZE, IMAGE_SIZE), Image.LANCZOS) Lanczos resampling keeps fine edges sharper than the default filters, which matters when the thing you're looking for is a thin ceramic disc against the sky. The batch ran across eight processes over a random sample of a thousand photos.
Boxes, and the bug everyone writes once
We labelled photos with bounding boxes for two classes, crossarm and insulator, saving them as Pascal VOC XML and then as COCO JSON.
Moving between formats is where object detection projects quietly go wrong. COCO describes a box by its top-left corner plus width and height. The training library wanted the box's centre plus width and height. Forget to add half the width and half the height and every box shifts down and to the right. The model still trains, the loss still falls, and it learns to point slightly beside everything. We converted with the centre calculation explicitly, then drew the converted boxes back onto the images and looked at them before training anything.
That habit, draw it and look, is the cheapest test in computer vision.
Training on a few dozen photos
The detector trained on a few dozen labelled photos, with a few hundred boxes between them, at a batch size of eight for 10,000 iterations, which took about an hour and a half.
That is a tiny dataset, and it was meant to be. A prototype's job is to answer "is there signal here, and where is it hard?" cheaply. It did. Reviewing predictions drawn beside the true boxes on held-out photos showed the pattern you'd expect: cross-arms, large and regular, came more easily than insulators, which are small and vary in type and angle.
The size problem is structural, and it's worth spelling out. The detector took a 416-pixel input. An insulator a few dozen pixels across in our 1024-pixel crop shrinks to around fifteen pixels by the time the model sees it. Some of the detail that distinguishes an insulator from the clutter behind it is simply gone. More training would not fix that; a different input strategy would.
We are deliberately not publishing accuracy numbers from this experiment. On a held-out set this small, a score mostly tells you which photos happened to land in the test split.
What production would need
The prototype answered its question. Here is what we'd tell anyone taking the same idea further:
- Many more labels, made by the people who know poles. We proposed an iPad labelling app, because there was no good tool for field staff to draw ground-truth boxes on photos. The people who can tell one insulator type from another should be the ones labelling.
- Tile instead of shrinking. Run the detector over overlapping full-resolution tiles, or use a larger input, so small parts keep their pixels.
- Split by pole, not by photo. A random split can put two photos of the same pole on both sides, and the test score then measures memory, not skill. Hold out whole poles, or whole areas.
- Detect components first, then defects. Finding the insulator is step one. Classifying cracked, chipped or flashed-over insulators is a separate model trained on crops, with its own labels and its own rare-class problem.
- Keep a person in the loop. A model that ranks photos for review, and highlights where to look, is useful long before it's trustworthy enough to decide anything.
- Decide where it runs. On the device in the field, or on servers the organisation controls. Inspection imagery of critical infrastructure is not something to send to a third-party AI service by default.
- Measure it in the workflow. The real metric isn't a detection score. It's whether inspectors find defects faster and miss fewer.
Where AI fits
This post is the AI: a convolutional object detector, trained and evaluated end to end. What has changed since is mostly around the model. Today we would use a modern detector and start labelling with model-assisted pre-labelling, where a model proposes boxes and people correct them, which turns hours of drawing into minutes of checking. The principles haven't changed: clean inputs, careful labels, honest splits, and a person deciding what the output means.
What it taught us
The most useful output of a prototype is often a decision, not a model. This one told us where the effort in pole-top vision really sits: in labelling and in image resolution, not in the choice of network. That shaped the proposal that followed, starting with a tool to let the right people label the right photos.
It also reinforced a way of working we still use: pick the smallest experiment that can fail informatively, run it fast, and write down what you learned before you scale anything.
Why it still matters
Organisations with physical assets, such as poles, pipes, roads, plant and fleets, are sitting on years of photos nobody has time to look at twice. Computer vision can help, if it's built around the right labels and an honest test. See how we approach computer vision and speech, or read how we built demand forecasting on the same network.