Upload image
Target segment
List of rest objects
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run remodela-ai/object-masks using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "remodela-ai/object-masks:42b836fe45018749f9b65b986b7e769b83bf06a44fbb47912eabb5c17a1865f4", { input: { IMAGE: "https://replicate.delivery/pbxt/LqHPEWdCMqZep0OTxe60U4qCp9UNy6gABkaaTCuQRiyZx1qs/demo1.jpg", target: "wall", classes: "[armchair, blanket, lamp, carpet, couch, dog, floor, furniture, gray, green, living room, picture frame, pillow, plant, room, sit, stool, wood floor,door,wood]\n" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
import replicate
output = replicate.run( "remodela-ai/object-masks:42b836fe45018749f9b65b986b7e769b83bf06a44fbb47912eabb5c17a1865f4", input={ "IMAGE": "https://replicate.delivery/pbxt/LqHPEWdCMqZep0OTxe60U4qCp9UNy6gABkaaTCuQRiyZx1qs/demo1.jpg", "target": "wall", "classes": "[armchair, blanket, lamp, carpet, couch, dog, floor, furniture, gray, green, living room, picture frame, pillow, plant, room, sit, stool, wood floor,door,wood]\n" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "remodela-ai/object-masks:42b836fe45018749f9b65b986b7e769b83bf06a44fbb47912eabb5c17a1865f4", "input": { "IMAGE": "https://replicate.delivery/pbxt/LqHPEWdCMqZep0OTxe60U4qCp9UNy6gABkaaTCuQRiyZx1qs/demo1.jpg", "target": "wall", "classes": "[armchair, blanket, lamp, carpet, couch, dog, floor, furniture, gray, green, living room, picture frame, pillow, plant, room, sit, stool, wood floor,door,wood]\\n" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{ "completed_at": "2024-10-23T01:10:05.437268Z", "created_at": "2024-10-23T01:09:53.860000Z", "data_removed": false, "error": null, "id": "503a5ejj8hrgj0cjpvpb6p3h0w", "input": { "IMAGE": "https://replicate.delivery/pbxt/LqHPEWdCMqZep0OTxe60U4qCp9UNy6gABkaaTCuQRiyZx1qs/demo1.jpg", "target": "wall", "classes": "[armchair, blanket, lamp, carpet, couch, dog, floor, furniture, gray, green, living room, picture frame, pillow, plant, room, sit, stool, wood floor,door,wood]\n" }, "logs": "trying to load grounding dino directly\nfinal text_encoder_type: bert-base-uncased", "metrics": { "predict_time": 11.533842344, "total_time": 11.577268 }, "output": "https://replicate.delivery/pbxt/flqUIRKTg5xUHK1dpg0Bpc7et0w8GJ9Tl6wrOlCVjQfb3flOB/annotated_output_pillow.jpg", "started_at": "2024-10-23T01:09:53.903426Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/503a5ejj8hrgj0cjpvpb6p3h0w", "cancel": "https://api.replicate.com/v1/predictions/503a5ejj8hrgj0cjpvpb6p3h0w/cancel" }, "version": "42b836fe45018749f9b65b986b7e769b83bf06a44fbb47912eabb5c17a1865f4" }
trying to load grounding dino directly final text_encoder_type: bert-base-uncased
View more examples
This model runs on Nvidia L40S GPU hardware. We don't yet have enough runs of this model to provide performance information.
This model doesn't have a readme.
# Interior Decoration Space Scaling - First Use Case
# Interior Decoration Space Scaling - Second Use Case
This model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.
Choose a file from your machine
Hint: you can also drag files onto the input