The model is now added to WebAI.js. Try it in your browser with no code required.

#7
by AxolsWebAI - opened

Hi there,

We've packaged this model inside our open-source library WebAI.js, so you can now integrate it into your project with just a few lines of code:

import { WebAI } from '@axols/webai-js';

const webai = await WebAI.create({
   modelId: "rmbg-modnet"
});


await webai.init({
  mode: "webai",
  precision: "fp16",
  device: "wasm"
});

const generation = await webai.generate({
  userInput: {
    image_blob_url: "blob:https://www.webai-js.com/2e773f45-43af-4466-ad34-4ef9d3b54915"
  },
  modelConfig: {
    processingResolution: {
      width: 1024,
      height: 1024
    }
  },
  generateConfig: {
    confidence_threshold: 0.5
  }
});

πŸ”¬ Try ModNet Instantly (No Code Required)

You can benchmark and test the model directly here:
https://www.webai-js.com/models/rmbg-modnet/playground

image

image


πŸ“˜ Full API Reference

Detailed parameter explanations can be found here:
https://www.webai-js.com/models/rmbg-modnet/api-reference/v1/class-api/methods/webai-generate

image


🧑 Fully Open Source

WebAI.js is completely open source and free to use.
Star or contribute on GitHub:
https://github.com/axolsai/webai-js

Thanks

Sign up or log in to comment