Automating Ecommerce Product Photo Processing
If you are processing more than a few hundred product photos, doing it by hand is not sustainable. This guide covers the automation workflow from the initial shoot to the marketplace upload.
If you are processing more than a few hundred product photos, doing it by hand is not sustainable. This guide covers the automation workflow from the initial shoot to the marketplace upload.
The pipeline has six stages: shoot, transfer, compress, process, quality check, upload. Each stage can be automated, and the automation of each stage depends on the tools you already use.
Shoot: use a consistent setup. Same lighting, same surface, same camera angle. The consistency in the source photos is the single biggest factor in the consistency of the output.
Transfer: get the photos from the camera to a processing directory. If you are shooting tethered, this happens automatically. If not, it is a manual step or a folder watch.
Compress: reduce file size before uploading to the processing API. High-resolution JPEGs at quality 90 are a good balance between size and quality.
Process: send the images to a background removal API and receive the cutouts.
Quality check: sample a subset of the results and verify that the edges are clean. Flag failures for reprocessing.
Upload: push the processed images to your ecommerce platform. This is often the most manual step because each platform has its own upload flow.
The batch endpoint accepts up to twenty images per request. For a catalog of a thousand images, that is fifty requests. At a rate limit of thirty requests per minute, the entire catalog processes in under two minutes of API time.
The actual processing time per batch is longer because the model runs on each image sequentially. Budget for roughly one second per image on the server side.
Error handling is important. Some images will fail. The API returns a status code and a JSON error body. Log the failures and reprocess them separately.
Automated quality control is hard because the definition of a good cutout is subjective. The practical approach is to sample. Process a hundred images, manually inspect ten, and estimate the failure rate.
If the failure rate is under five percent, proceed with the full catalog and handle failures manually afterward. If it is higher, adjust the source photos or the processing settings.
The X-Quality-Label header on the API response gives a rough signal. Images labeled Fair or Poor are more likely to need review. Use it to prioritize the manual check.
If you are using a paid API at two cents per image, a thousand-image catalog costs twenty dollars. At ten thousand images, two hundred dollars.
If you are using a free API, the cost is zero in dollars but there is a rate limit. At thirty requests per minute and twenty images per request, you can process six hundred images per minute at maximum throughput.
The time cost of the workflow is the variable that matters most. A hundred images processed by hand takes hours. The same hundred images processed through an API takes minutes.
The bulk endpoint accepts multiple files and returns a ZIP. For a large catalog, this is more efficient than processing one at a time.
Log the filenames and error codes. Reprocess them individually with different settings, or handle them manually. A failure rate of a few percent is normal.
Yes. The API is HTTP-based. Any scheduler that can make HTTP requests works. Cron, GitHub Actions, or a serverless function on a timer are all viable.
Yes, somewhere. The API returns the results but does not store them. Save them to your own storage before uploading to the marketplace.