DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to replace OXR's layout model with your own for a niche document type with OXR

Point the OXR parsing API at a custom layout analysis service while keeping OXR for recognition.

Short answer: Download the OXR model weights with hf download SoMarkAI/OXR-1.0 --local-dir ./models/OXR-1.0; then run your custom layout analysis model as an HTTP service, with its API compatible with the built-in one. The README does not document this interface; start the OXR model service, using the vLLM steps in the README or the Docker image. All steps.

Who it is forA document parsing provider or domain team whose forms, reports, or exam papers need different region rules than the built-in layout model.

The problemLayout analysis rules differ by business use case, and a generic layout model may group or bound regions wrongly for your documents.

The outcomeOXR runs recognition and reading order on regions produced by your own layout model.

What you need first

  • A PDF or document image to parse
  • Python 3.12 or Node.js for the SoMark CLI, or Docker for a local service
  • For local hosting: Linux, an NVIDIA GPU with BF16 support, and 24GB or more of GPU memory

Steps

  1. Download the OXR model weights with hf download SoMarkAI/OXR-1.0 --local-dir ./models/OXR-1.0.
  2. Run your custom layout analysis model as an HTTP service, with its API compatible with the built-in one. The README does not document this interface. (inferred, check the README)
  3. Start the OXR model service, using the vLLM steps in the README or the Docker image.
  4. Copy config.example.yaml to config.yaml and set the url field under layout_analyze_model to your custom service address.
  5. oxr serve --config config.yaml --host 127.0.0.1 --port 8000 --workers 1 (inferred, check the README)

Prompt for your agent

Using the OXR repo at https://github.com/SoMarkAI/OXR, set the layout_analyze_model url in config.yaml to <custom-layout-service-url> and start the parsing API. Parse <path-to-sample-document.pdf> and verify that the layout bounding boxes in the JSON output come from the custom layout service.

Caveat. The README says any Layout Analysis model can work with OXR but does not document the interface a custom layout service must expose, so this needs to be checked against the code.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for SoMarkAI/OXR and "Replace OXR's layout model with your own for a niche document type"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer