Vision Field Notes

Input Resolution or Model Size: Which to Increase for Small Objects

A detector misses people at the far end of a car park. You have compute to spare, and two obvious ways to spend it: move from the nano model to the small or medium one, or raise the input size from 640 to 960 or 1280. Both cost speed. They do not fix the same problem.

This article explains what each change does, why input size is usually the first thing to try for small objects, and how to test both properly.

What the model actually sees

Before the network sees a frame, the frame is resized to the input size. A 1920 × 1080 frame resized to a 640-pixel input is shrunk by a factor of three. A person who is 60 pixels tall in the camera image is about 20 pixels tall at the model's input.

At 20 pixels, a person is a smudge with a head. Details that separate a person from a post, or a helmet from a bare head, are a few pixels wide or have disappeared entirely. A bigger model cannot recover detail that was removed before the network saw the image. It can only make better guesses from the same smudge.

Raising the input size puts the pixels back. At a 1280 input, the same frame is shrunk by 1.5 instead of 3, and the person is 40 pixels tall.

The compute cost of each

The cost of the convolutional layers that make up most of a detector grows roughly with the number of input pixels, so with the square of the input side.

Line chart against square input size from 320 to 1280. Relative compute rises with the square of the size, from 0.25 at 320 to 4 at 1280. Relative object height rises linearly, from 0.5 to 2.
Arithmetic, not a benchmark. Going from 640 to 1280 doubles the pixels on every object and roughly quadruples the convolution work. Real speed also depends on hardware, runtime and post-processing.

Model size scales differently. In the Ultralytics YOLOv8 family, for example, the published compute at 640 input grows by roughly three times from nano to small, and roughly three times again from small to medium. So, very roughly:

These ratios describe the network's arithmetic, not your frame rate. Actual speed depends on how well your hardware and runtime handle each case, so measure on the target device; see Measuring FPS and Latency Correctly.

When input size helps

Raise the input size first when:

Train at the size you will run. A model trained at 640 and run at 1280 sees objects at twice the scale it learned, and often does worse than you expect. Fine-tune at the new size; see Fine-Tuning YOLO.

When model size helps

A bigger model helps when the objects are already visible but the decisions are hard:

If your misses are large, clear objects that the model gets wrong, resolution will not help. Capacity might. See Nano, Small, Medium: How to Choose a YOLO Model Size.

Cheaper than both

Before paying for either, check the options that add pixels without adding much compute everywhere:

How to decide with data

  1. Collect the misses at your operating threshold from a test set that represents the deployment.
  2. Measure their size at the current model input. Plot the distribution.
  3. If most misses are small, train and test the same model at a larger input, for example 960.
  4. If most misses are reasonably large, train and test the next model size at the current input.
  5. Compare both at your operating point, per class and by object size, and measure the speed of each on the target device.
  6. Repeat with a few seeds if the differences are small; see Comparing Two Detectors Fairly.

Sometimes the answer is both: a small model at a larger input. Nano at 1280 and small at 640 cost similar compute, and for small-object problems the first often wins. That is something to test, not assume.

Watch the side effects

A larger input also changes things you might not expect:

Checklist

Next steps: Class Imbalance and Small Objects and Preprocessing Mismatches That Silently Cost Accuracy.