Skip to main content
Blog
Tutorial
Oct 25, 20268 min

How to Prepare Clean Object Images for a Computer Vision Dataset

Reference shots, cutouts for copy-paste augmentation, and classifier crops: how to prepare object images on your own device, what to keep original, and where labeling takes over.

Some computer-vision work happens in an image editor before labeling starts. Many teams need some of these alongside their labeled scenes:

  • a clean reference shot of every product,
  • a set of object cutouts to paste into new backgrounds,
  • tight crops for a classifier,
  • or simply a copy of a photo without the location data embedded by the phone.

This guide covers how to prepare those images on your own device with LabelOp Retouch, a free in-browser photo editor in the LabelOp family. It also covers which images you should not touch at all.

Short answer

Use Retouch for pixel preparation: cutting out objects, putting them on consistent backgrounds, sizing them, and stripping metadata. Use a labeling tool such as LabelOp for labels.

Keep the original images for anything a model trains on or is evaluated against. Only edit them when the same edit happens in production.

Retouch runs its models in the browser, on your device. Your images are never uploaded, which helps when they are unreleased products, customer material or anything under contract.

First: a cutout is not a label

This is the most common mix-up.

A transparent PNG of a product is an image. It has no class name and no instance ID. It is not tied to a scene or to any dataset version.

An object detection or segmentation model learns from labeled scenes: real backgrounds, real lighting, other objects nearby, and objects that are partly hidden.

So cutouts and clean shots support a dataset. They do not replace one. They work best for:

  1. Reference galleries. One or more clean images per class or SKU, used for retrieval, few-shot setups or human reference. See the retail shelf annotation guide for why SKU references matter.
  2. Copy-paste augmentation. Pasting cut-out objects into new backgrounds to add rare classes or unusual positions. The synthetic vs real data guide covers when this helps and when it hurts.
  3. Classifier crops. One object per image, centered and at a consistent size.
  4. Sharing and documentation. Example images for a labeling guide or a dataset card, with metadata removed.

Step 1: Decide what each image is for

Before you open an editor, sort images into two groups:

  • Training and evaluation images. Leave them as captured. Label them in your labeling tool.
  • Supporting images. References, augmentation sources and documentation examples. These are what you edit.

If an image ends up in both groups, keep two files: an untouched original and an edited copy with a clear name.

Step 2: Cut out the object

Open Retouch in Chrome or Edge 113 or later for full WebGPU support. Drop in a photo or paste one with Ctrl/Cmd+V.

You have two ways to cut out an object:

Remove background (R). Best when the photo has one clear subject, such as a product on a table. It uses BEN2 Base (MIT, about 223 MB, downloaded once after you approve it). The result is a new layer named after the photo with "cutout" added, and the original stays as a hidden backup layer.

Select object (S). Best when you need one specific object in a busy scene. Click the object, then add Include or Exclude points to correct the selection. Alt+click or right-click also excludes an area, and Undo last point removes the last point. When it looks right, click Accept selection. This creates a new layer named after the photo with "selection" added. It uses EdgeTAM (Apache-2.0, about 21 MB).

For a step-by-step walkthrough of the cutout tools, see remove a background in your browser without uploading it.

Step 3: Check the mask like a reviewer

If you plan to paste the cutout somewhere, edge quality matters more than it does for a marketing image. A halo of old background around a pasted object is something a model can learn to look for.

With the cutout layer selected:

  • Turn on Show hidden areas in red to see what the mask removes.
  • Use Reveal (B) to bring back parts of the object that were cut off, and Hide (E) to remove leftover background.
  • Under Refine edges, use Grow / shrink (±20 px), Edge sharpness and Soften edges (0–10 px). The sliders preview live and do not rerun the model. Click Apply to keep the result.
  • Use Remove color fringe and Clean edges to remove leftover background color along the edge.

Hard or soft edges?

The PNG's alpha channel is your mask. A soft edge looks natural in a composite, but its partly transparent pixels make an unclear mask.

If you plan to turn the alpha into a binary mask later, keep Edge softness and Soften edges at 0. Then pick and write down one threshold. If you want natural-looking composites, a small feather is fine, as long as every cutout uses the same setting.

Step 4: Make the set consistent

Consistency is what makes a supporting set useful. Retouch has the controls for it:

  • Crop (X) with Free, 1:1, 4:3 or 16:9 aspect locks.
  • Resize in the header, by scale or by exact width and height in pixels.
  • New background: White, Black, Gray, Gradient, a Custom color, or your own Image…. Use one setting for the whole set.
  • Export size: keep the original proportions, scale to 75/50/25%, or use a fixed preset. For presets, Pad (fit) fits the object inside the frame and fills the rest, and Crop (fill) fills the frame and crops the overflow.

Be careful with backgrounds for classifier crops. A classifier trained only on objects against plain white learns that plain white is part of the class. If production images have cluttered backgrounds, use clean crops for reference or evaluation slices, not as your whole training set.

Step 5: Export, singly or in batches

Press Ctrl/Cmd+S:

  • PNG keeps the alpha channel at the best quality. Use it for cutouts.
  • WebP and AVIF keep transparency in smaller files (AVIF only if your browser can encode it).
  • JPEG turns transparent areas white. Use it only for flat images that should end up on white.

Exports are re-encoded from the canvas pixels. Camera EXIF data, including GPS location, is therefore removed. That helps when photos taken on staff phones become documentation examples. It is a problem if your pipeline reads capture time or camera data from EXIF. In that case, save the metadata somewhere else before you edit.

For larger sets, open Batch in the sidebar and choose Remove background. Add PNG, JPEG, WebP or AVIF files. Retouch processes them one after another on your device and saves transparent PNGs, individually or with Save ZIP. Batch has no brush step, so review the results and fix outliers in the editor.

Step 6: Hand off to labeling and versioning

Once the supporting images are ready:

  • Put them in their own project or folder, separate from the labeled training scenes.
  • Label anything that needs labels in LabelOp's labeling workspace, where click segmentation also runs in the browser.
  • Track dataset versions in dataset management, and export to the format your trainer expects via export formats.

Watch for split leakage

Watch for one thing in particular: leakage between splits. Suppose a cutout comes from a photo in your test set and gets pasted into training images. The model has then already seen that object in that exact pose. Cut out objects only from training-split images, and record where each cutout came from. See dataset split planning.

Also write the processing down in your dataset card: which tool and model made the cutouts, the edge settings, the backdrop, and the export size.

What not to "clean up"

Retouch also has Upscale (2x or 4x), Denoise, Erase objects and Sharpen. They are useful for supporting images. Be careful with them on images a model trains on:

  • Upscaling invents plausible detail. Small objects can gain detail the camera never captured, and your labels then describe something that was never there.
  • Denoising changes the input distribution. If production frames are noisy, the model has to learn from noisy frames.
  • Erase objects is not redaction. It fills the painted area to match its surroundings using the Moebius model (about 1.24 GB, WebGPU only). That works for removing a distracting item from a reference shot. To remove personal data from training images, follow a proper redaction policy. See the annotation privacy and redaction checklist.

The upscale and denoise guide covers these trade-offs in more detail.

Why local processing matters here

Datasets often contain material a team cannot share casually, such as prototype hardware or customer property. Retouch keeps the processing on your device. Models download once and are cached; one is served by the Retouch site and the others come from Hugging Face. The Models tab shows each model's source, size and license before you download it. Your images are never uploaded. The site counts page views with privacy-friendly analytics, which never include image data. Details are on the privacy page.

Limits

  • Browser support. Chrome and Edge 113 or later get full WebGPU support. Safari 26 and later and some Firefox versions use a slower WebAssembly fallback. Erase objects needs WebGPU.
  • Desktop first. Mobile and touch input are not optimized yet.
  • Input limits. Files over 50 MB, or with a side longer than 16,384 px, are refused. Above 24 MP the editor asks whether to downscale.
  • Single images only. There are no text or vector layers, and no cloud sync. For video frames, see LabelOp Tracker for annotation and Moments for finding the scenes worth extracting.

Start

Open LabelOp Retouch to prepare your supporting images. When they are ready, bring them into LabelOp to label and version them with the rest of your dataset.

FAQ

Can I use Retouch cutouts as segmentation labels?

Not directly. A cutout's alpha channel is a pixel mask, but it has no class name, instance ID or link to a dataset version. Use cutouts as supporting images, and create the actual labels in a labeling tool such as LabelOp.

Should I remove backgrounds from my training images?

Usually not for detection or segmentation training. Models need real scenes. Clean cutouts are most useful for reference galleries, copy-paste augmentation and evaluation slices, used alongside real labeled images.

Does exporting from Retouch remove EXIF and GPS data?

Yes. Every export is re-encoded from canvas pixels, so camera metadata, including GPS location, is removed. If your pipeline needs that metadata, save it separately first.

Are my dataset images uploaded anywhere?

No. Retouch processes images in your browser on your device. Only the AI models are downloaded, once, and then cached for offline use.

Can I process hundreds of images?

Batch mode removes backgrounds from many images one after another on your device and saves transparent PNGs as a ZIP. Review the results and fix outliers in the editor, since batch has no manual touch-up step.

Take the next step with your dataset.

Use local AI, managed cloud labeling, and team review in LabelOp. Export your work or train with your own Vast.ai account.

Start free