Generate masks for objects in images for tasks like image segmentation, medical imaging, and computer vision applications
Basic usage
Send an image to a model to generate object masks
import Bytez from 'bytez.js';// insert your keyconst sdk = new Bytez('BYTEZ_KEY');// choose your modelconst model = sdk.model('facebook/sam-vit-base');// provide the model with inputconst input = { "url": "https://huggingface.co/datasets/huggingfacejs/tasks/resolve/main/mask-generation/mask-generation-input.png"};// send to the modelconst { error, output } = await model.run(input);// observe the outputconsole.log({ error, output });
from bytez import Bytez# insert your keysdk = Bytez("BYTEZ_KEY")# choose your modelmodel = sdk.model("facebook/sam-vit-base")# provide the model with inputinput = { "url": "https://huggingface.co/datasets/huggingfacejs/tasks/resolve/main/mask-generation/mask-generation-input.png"}# send to the modelresult = model.run(input)# observe the outputprint({"error": result.error, "output": result.output})