QuiddityML

How to build your own image dataset: collection goals, camera placement, controlled vs in-the-wild

When to collect your own images, how to write a collection plan and a coverage table before the first photo, and how camera placement and capture conditions end up inside the model.

Computer VisionBy · 30 November 2026 · 7 min read

Building your own image dataset means taking the photos your model will learn from yourself, under a plan written before the first one. It is slower than downloading a public dataset, and it is the way to go when no public dataset shows your camera, your scenes or the cases your system exists to catch. The choices made while collecting, such as where the camera hangs and which cases get photographed, become part of what the model learns.

When you need your own data

Collect your own images when no existing dataset fits the task. The missing piece might be your domain, such as the inside of one company's warehouse. It might be your camera, the labels you need or the right to use the images. It might also be the rare cases the task depends on.

When custom data is necessary: domain, modality, labels, usage rights or edge cases missing from the available datasets.

Collection starts from the task statement. That is a written description of what the system outputs and who uses it, plus what input it gets and what a mistake costs. The task statement and the label plan define what to photograph and how to label it.

Write the collection plan before the first image

The example in this post is a warehouse task: a camera above each packing station photographs every box, and the model labels each photo intact or damaged so damaged boxes can be pulled aside.

Decide the whole collection plan before the first photo. Changing it halfway, for example moving the camera after 5,000 photos, splits the dataset into two halves that look different and get labeled differently. For the warehouse task the plan reads:

  • source: the company's own packing stations, at 3 sites
  • device: the installed overhead camera, 1080p, fixed in place
  • protocol: one photo per box as it is placed on the station, in the room's normal lighting
  • consent and rights: internal packages, no faces in frame, images owned by the company
  • annotators: 2 trained warehouse staff label each photo intact or damaged
  • review: a lead re-checks 10 percent of the labels and logs disagreements
  • test set: all photos from site 3, so the test photos come from a site the model never trained on

A filled-in collection plan with rows for source, device, protocol, consent and rights, annotators, review and splitting key, all fixed before the first image.

Set targets with a coverage plan

A coverage plan lists each condition the model has to handle and a target number of images for each. Conditions include the classes, the lighting, the viewpoints and the backgrounds. Partway through collection, the warehouse plan looks like this:

Condition Target Collected
box intact, good light 3000 3120
box intact, dim light 3000 900
crushed corner 1500 1450
torn tape 1500 210
water damage 800 40

The gaps show up while collection is still running: dim light, torn tape and water damage are far short. Without the table, you would notice only after training, when the model fails on those cases.

The coverage plan as a table with progress bars: good light and crushed corner are close to their targets, while dim light, torn tape and water damage are far short.

The same table is a few lines of Python, which makes it easy to rerun every day as new photos come in:

targets = {
    "box intact, good light": 3000,
    "box intact, dim light": 3000,
    "crushed corner": 1500,
    "torn tape": 1500,
    "water damage": 800,
}
collected = {
    "box intact, good light": 3120,
    "box intact, dim light": 900,
    "crushed corner": 1450,
    "torn tape": 210,
    "water damage": 40,
}

for condition, target in targets.items():
    have = collected.get(condition, 0)
    need = max(target - have, 0)
    print(f"{condition:24s} {have:5d} of {target:5d}   still need {need}")
box intact, good light    3120 of  3000   still need 0
box intact, dim light      900 of  3000   still need 2100
crushed corner            1450 of  1500   still need 50
torn tape                  210 of  1500   still need 1290
water damage                40 of   800   still need 760

collected.get(condition, 0) returns 0 for a condition with no photos yet, and max(..., 0) keeps a condition that went past its target from showing a negative number. In a real project collected would come from counting the labeled photos per condition.

Plan for the costly cases

Plan on purpose for the cases where a mistake costs the most: near-misses, ambiguous examples and the rare events the system exists to catch. For the warehouse, those include water damage, which is rare and is one of the kinds of damage the system is meant to flag.

Ten thousand more photos of intact boxes, from the same camera at the same time of day, add almost no new information. Coverage is about which conditions are in the data. Set the targets before collection starts, because gaps found afterward mean going back to the sites to photograph more.

Plan for the costly cases: near-misses, ambiguous examples and rare events the system exists to catch. Set the targets before collection starts.

Camera placement becomes the data

However the camera is mounted and set, that setup is part of every training image. Its height, angle and lens decide how large objects look, the perspective they are seen from and how much of the scene is in frame. Time of day, season, motion and the instructions given to whoever takes the photos shape the data too.

The model learns that particular setup and expects the same one when it is deployed. A model trained on photos from a camera above the station has learned what boxes look like from above.

A camera on a pole looks down on a conveyor with boxes. This viewpoint is in every image, and the model expects it at deployment.

How placement creates shortcuts

A shortcut is a pattern in the training images that predicts the label without being the thing the model is supposed to detect. A fixed camera that always sees defects in the same corner teaches the model to look in that corner. A camera angle that never shows the underside of an object means the model never learns what the underside looks like.

For example, an inspection camera photographs metal parts on a belt. In the training set, 90 percent of the defect photos happen to be taken when the belt sits in its lower position, during the shift that ran an older machine. The model learns that "belt low" means defect. It scores 96 percent on a test set with the same skew. In production the belt position is random, and the score drops to 71 percent.

The same part on a low belt with a crack and on a high belt without one. 90 percent of defect images are belt low. Test set with the same skew: 0.96. Production with a random belt: 0.71.

A test set collected the same way as the training set has the same shortcut, so the model scores well on it anyway. The site-3 test set in the warehouse plan is there for this reason: a shortcut tied to one site's camera or lighting stops working on another site's photos.

Document the capture conditions

When different sites or shifts capture photos differently, the same object looks different across the dataset. Annotators then label it differently too.

Keep one protocol and record it with the dataset. Write down the camera model and how it is mounted. Also record its settings, the lighting and the instructions given to whoever takes the photos. When the model behaves strangely later, that record is often where the explanation is.

Document the capture conditions: camera model, mounting, settings, lighting and protocol.

Controlled vs in-the-wild data

Controlled data is captured under fixed conditions: set lighting, a known camera, a fixed distance and a plain background. Images differ only in the ways you chose. That suits precise measurement, and it lets you debug by changing one thing at a time.

In-the-wild data is captured under whatever conditions real use brings: different phones, rooms, weather and angles. It shows whether the model holds up in the situations it will meet, including ones nobody thought to stage.

Pick by what you need to learn. Controlled data answers questions about the model, such as how its accuracy changes when only the lighting changes. In-the-wild data answers whether it works for real users. A dataset made only in a lab, for a system that ships to phones, gives great results in the lab and fails in the field.

Choose by the system goal: measure model behavior with controlled data, ship to real users with in-the-wild data. Lab-only data for a phone app looks great, then fails.

Common mistakes

  • Changing the camera or lighting halfway through. The dataset splits into two halves that look different, and the labels often split with them.
  • No targets per condition. Collection fills up with the easy cases, and the gaps show up only after training.
  • Testing on photos taken the same way as the training photos. A placement shortcut passes that test. Hold out a site, a camera or a time period instead.
  • Not writing down the capture setup. Months later it is hard to tell why one site's photos behave differently.
  • Using only lab photos for a system that runs in the wild. Add photos from the conditions where the system will be used.

Before collecting, check whether a public dataset already covers the task. Where to find computer vision datasets walks through that, along with the long tail that targeted collection fixes. A collection plan also has to say who owns the images and who agreed to be photographed, which Image rights and privacy covers. Vision tasks and label types covers the task statement and the label type the plan starts from.

QuiddityML teaches collection planning and camera setup in the vision data unit of its Computer Vision track, and the exercises on them include working out what happens to a dataset when the camera and lighting change halfway through collection and what a model learned when 90 percent of the defect photos were taken with the belt low (QuiddityML).