Predict object distances from a camera using depth estimation models for robotics, AR, and autonomous vehicles
Basic usage
Send an image to a depth estimation model to generate a depth map
import Bytez from 'bytez.js';// insert your keyconst sdk = new Bytez('BYTEZ_KEY');// choose your modelconst model = sdk.model('vinvino02/glpn-nyu');// provide the model with inputconst input = { "url": "https://as1.ftcdn.net/v2/jpg/03/03/55/82/1000_F_303558268_YNUQp9NNMTE0X4zrj314mbWcDHd1pZPD.jpg"};// 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("vinvino02/glpn-nyu")# provide the model with inputinput = { "url": "https://as1.ftcdn.net/v2/jpg/03/03/55/82/1000_F_303558268_YNUQp9NNMTE0X4zrj314mbWcDHd1pZPD.jpg"}# send to the modelresult = model.run(input)# observe the outputprint({"error": result.error, "output": result.output})