DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to raise mask quality with the five-model ensemble with Fle Xray

Use --ensemble and --tta-samples to trade run time for more accurate anatomy masks.

Short answer: Install the package with python -m pip install flexray; then run the X-High mode with flexify --ensemble --tta-samples 8 --input ./image.png --output-dir ./predictions; To keep one anatomical label only, add --binary femurs to the same command. All steps.

  • Research
  • Intermediate
  • 30 minutes
  • From the README
  • Any agent

Who it is forA researcher comparing segmentation results who needs the best available output for a small batch of X-rays and can wait longer per image.

The problemA single forward pass of the flagship model may not give the most reliable masks for difficult images.

The outcomeMasks from the X-High setting, five-model ensemble with 8-pass test-time augmentation, saved to a predictions folder, optionally limited to one label.

What you need first

  • Python 3.10 or newer and pip
  • One or more X-ray images in PNG, JPEG, TIFF, BMP, or DICOM (DICOM needs the dicom extra)
  • Internet access to download pretrained weights from Hugging Face on first run
  • For training only: a labeled dataset, and a GPU or CPU for the dry run; the README says training is single-process with at most one GPU
  • For the MCP use case: an MCP-capable client such as Claude Code or Claude Desktop

Steps

  1. Install the package with python -m pip install flexray.
  2. Run the X-High mode with flexify --ensemble --tta-samples 8 --input ./image.png --output-dir ./predictions.
  3. To keep one anatomical label only, add --binary femurs to the same command.
  4. Compare the output against the Low mode with flexify --input ./image.png --output-dir ./predictions_low and review the masks side by side. (inferred, check the README)

Prompt for your agent

In the FleXray repo, run `flexify --ensemble --tta-samples 8 --input <image-path> --output-dir <output-dir>` on the target X-ray. Expect the same three .npy arrays plus label_names.json. Verify that the mask arrays are uint8 and that the channel count matches label_names.json.

Caveat. The README does not give run-time or accuracy numbers for the modes, so the time cost and quality gain must be measured on your own images.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for VictorButoi/FleXray and "Raise mask quality with the five-model ensemble"

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