Skip to content
Quillmark

Part 2: From Pixels to Species

How image classifiers help review field data, and why people stay in the loop.

JW
James Wilson
October 22, 20261 min read

Once images and sounds are collected, a classifier can sort them so that people spend their time on the hard cases.

What a classifier does

A classifier looks at an image and returns a score for each possible species. The highest score is its best guess.

classify.py
def classify(image, model, threshold=0.8):
    scores = model.predict(image)  # species -> probability
    species, score = max(scores.items(), key=lambda kv: kv[1])
    if score < threshold:
        return "needs human review"
    return species

Keeping people in the loop

A confidence threshold sends uncertain results to an expert instead of trusting the model blindly. Raising the threshold means fewer mistakes but more manual review.

Measuring quality

Two numbers are common. Precision asks how many of the model's detections were right, and recall asks how many real animals it found.

precision=TPTP+FPrecall=TPTP+FN\text{precision} = \frac{TP}{TP + FP} \qquad \text{recall} = \frac{TP}{TP + FN}

Written by