OpenNoMark
Use the OpenNoMark CLI as the deterministic execution layer. Preserve every source image and write cleaned files to a separate output directory.
Run
- Confirm that the inputs are user-provided or that the user is authorized to edit them.
- Resolve every requested image path. Accept PNG, JPEG, and WebP files, directories, and glob patterns.
- Prefer an installed
opennomarkexecutable. Otherwise run it from the official repository withuvx:
opennomark <inputs...> --output <output-directory> --json
uvx --from git+https://github.com/NanmiCoder/OpenNoMark.git opennomark <inputs...> --output <output-directory> --json
- Set
--device cudaonly when CUDA is available. Allow automatic device selection otherwise. Do not forcemps; LaMa safely falls back to CPU on Apple Silicon. - Parse the JSON response. Treat exit code
0withstatus: "ok"as success,1as invalid or missing input, and2as a model-loading or processing failure. - Report the absolute paths in
results[].output, grouped bycleanedandno_watermark. Treatpartialas a failure that requires review: it can mean unresolved residual evidence or that dense/tiled candidates exceeded the automatic-removal safety budget. Do not claim an image was cleaned when its status says otherwise. - Inspect at least one output when visual inspection is available. For batch requests, inspect representative outputs and any low-confidence or unexpected result.
The first run can take longer because model weights are downloaded and cached. Keep the command running while downloads or inference are active.
Useful options
# Batch a directory without overwriting the originals
opennomark /path/to/images --output /path/to/cleaned --json
# Save detector boxes and masks when diagnosing a miss
opennomark /path/to/image.png --output /path/to/debug --debug --json
# Inspect the installed CLI version
opennomark --version
Use --debug only for diagnosis because it creates extra artifacts beside the cleaned output.