The problem
ONNX image segmentation and native image libraries retained memory between jobs, making a normal long-running worker unsafe on a small production server.
03Project mission dossier
Image processing infrastructure · 2026
A stateless image-processing platform for compression, format conversion, and AI background removal, engineered for a constrained ARM server.
ONNX image segmentation and native image libraries retained memory between jobs, making a normal long-running worker unsafe on a small production server.
Every background-removal job runs in a disposable child process. The operating system reclaims native memory after completion, while queues, limits, validation, and temporary storage keep workloads bounded.
Verified components and boundaries found in the project source and documentation.
Vercel interface and direct uploads
HTTPS and exact-origin CORS
Validation, rate limits and bounded queue
One ONNX process per background job
Request-scoped files removed after use
Disposable isolated AI workers
Defensive file and pixel validation
Bounded queue and temporary storage
Docker, Caddy, HTTPS, metrics, and structured logs

ONNX and Sharp retained native allocations between jobs beyond JavaScript heap control.
Higher-quality segmentation competes directly with a single OCPU and bounded container memory.
Full-stack developer & deployment owner
Designed the frontend/API deployment split
Built image processing, validation, queues, and worker isolation
Containerized and deployed the ARM production stack
The production benchmark processed a 3072 × 4080 image with the higher-quality model below a 3 GiB container limit and returned memory to baseline without swap usage.
Premium commerce storefront