garg-aayush / ml-depth-pro
Apple's monocular depth estimation foundation model (Depth Pro)
Prediction
garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071IDctjavkezz1rgg0cjhfmst8v8fgStatusSucceededSourceWebHardwareA40Total durationCreatedby @garg-aayushInput
{ "image": "https://replicate.delivery/pbxt/LnJbqGpx75nzyaLyaWzszkOqw2BIvBHDxdqTJigMj2UZPLQu/toy.png", "auto_rotate": true, "remove_alpha": true }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run garg-aayush/ml-depth-pro using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071", { input: { image: "https://replicate.delivery/pbxt/LnJbqGpx75nzyaLyaWzszkOqw2BIvBHDxdqTJigMj2UZPLQu/toy.png", auto_rotate: true, remove_alpha: true } } ); // To access the file URL: console.log(output[0].url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run garg-aayush/ml-depth-pro using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071", input={ "image": "https://replicate.delivery/pbxt/LnJbqGpx75nzyaLyaWzszkOqw2BIvBHDxdqTJigMj2UZPLQu/toy.png", "auto_rotate": True, "remove_alpha": True } ) # To access the file URL: print(output[0].url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output[0].read())
To learn more, take a look at the guide on getting started with Python.
Run garg-aayush/ml-depth-pro using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071", "input": { "image": "https://replicate.delivery/pbxt/LnJbqGpx75nzyaLyaWzszkOqw2BIvBHDxdqTJigMj2UZPLQu/toy.png", "auto_rotate": true, "remove_alpha": true } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog:brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/garg-aayush/ml-depth-pro@sha256:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071 \ -i 'image="https://replicate.delivery/pbxt/LnJbqGpx75nzyaLyaWzszkOqw2BIvBHDxdqTJigMj2UZPLQu/toy.png"' \ -i 'auto_rotate=true' \ -i 'remove_alpha=true'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/garg-aayush/ml-depth-pro@sha256:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/LnJbqGpx75nzyaLyaWzszkOqw2BIvBHDxdqTJigMj2UZPLQu/toy.png", "auto_rotate": true, "remove_alpha": true } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2024-10-14T16:45:04.366104Z", "created_at": "2024-10-14T16:43:33.240000Z", "data_removed": false, "error": null, "id": "ctjavkezz1rgg0cjhfmst8v8fg", "input": { "image": "https://replicate.delivery/pbxt/LnJbqGpx75nzyaLyaWzszkOqw2BIvBHDxdqTJigMj2UZPLQu/toy.png", "auto_rotate": true, "remove_alpha": true }, "logs": "Visualizing inverse depth in range [0.1m;250m] for better visualization.\noutput_path: /tmp/output.png\nFocal length: 1534.649", "metrics": { "predict_time": 2.124508773, "total_time": 91.126104 }, "output": [ "https://replicate.delivery/pbxt/Qt10sIeKtZ1FGq4ljqtfNHAdYFwS3EHlW09VvLmDI6RQyvmTA/output.png" ], "started_at": "2024-10-14T16:45:02.241595Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ctjavkezz1rgg0cjhfmst8v8fg", "cancel": "https://api.replicate.com/v1/predictions/ctjavkezz1rgg0cjhfmst8v8fg/cancel" }, "version": "83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071" }
Prediction
garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071ID2vd25xxwh9rgm0cjhfnrx3wpdcStatusSucceededSourceWebHardwareA40Total durationCreatedInput
{ "image": "https://replicate.delivery/pbxt/LnJdlkLAej8J4s0RwIsRIyxp1fhqWb7GISpYXpTsEQHe1kyN/org_mid.jpg", "auto_rotate": true, "remove_alpha": true }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run garg-aayush/ml-depth-pro using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071", { input: { image: "https://replicate.delivery/pbxt/LnJdlkLAej8J4s0RwIsRIyxp1fhqWb7GISpYXpTsEQHe1kyN/org_mid.jpg", auto_rotate: true, remove_alpha: true } } ); // To access the file URL: console.log(output[0].url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run garg-aayush/ml-depth-pro using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071", input={ "image": "https://replicate.delivery/pbxt/LnJdlkLAej8J4s0RwIsRIyxp1fhqWb7GISpYXpTsEQHe1kyN/org_mid.jpg", "auto_rotate": True, "remove_alpha": True } ) # To access the file URL: print(output[0].url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output[0].read())
To learn more, take a look at the guide on getting started with Python.
Run garg-aayush/ml-depth-pro using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071", "input": { "image": "https://replicate.delivery/pbxt/LnJdlkLAej8J4s0RwIsRIyxp1fhqWb7GISpYXpTsEQHe1kyN/org_mid.jpg", "auto_rotate": true, "remove_alpha": true } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog:brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/garg-aayush/ml-depth-pro@sha256:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071 \ -i 'image="https://replicate.delivery/pbxt/LnJdlkLAej8J4s0RwIsRIyxp1fhqWb7GISpYXpTsEQHe1kyN/org_mid.jpg"' \ -i 'auto_rotate=true' \ -i 'remove_alpha=true'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/garg-aayush/ml-depth-pro@sha256:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/LnJdlkLAej8J4s0RwIsRIyxp1fhqWb7GISpYXpTsEQHe1kyN/org_mid.jpg", "auto_rotate": true, "remove_alpha": true } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2024-10-14T16:45:37.449586Z", "created_at": "2024-10-14T16:45:35.242000Z", "data_removed": false, "error": null, "id": "2vd25xxwh9rgm0cjhfnrx3wpdc", "input": { "image": "https://replicate.delivery/pbxt/LnJdlkLAej8J4s0RwIsRIyxp1fhqWb7GISpYXpTsEQHe1kyN/org_mid.jpg", "auto_rotate": true, "remove_alpha": true }, "logs": "Visualizing inverse depth in range [0.1m;250m] for better visualization.\noutput_path: /tmp/output.png\nFocal length: 959.157", "metrics": { "predict_time": 2.200211098, "total_time": 2.207586 }, "output": [ "https://replicate.delivery/pbxt/3TGBpnu9NiZNJBjuTLQq4CYYr9uarfavPjNYb6sO4JkY5XzJA/output.png" ], "started_at": "2024-10-14T16:45:35.249374Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/2vd25xxwh9rgm0cjhfnrx3wpdc", "cancel": "https://api.replicate.com/v1/predictions/2vd25xxwh9rgm0cjhfnrx3wpdc/cancel" }, "version": "83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071" }
Prediction
garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071IDrvf1p18h79rgj0cjhfpay3qx5gStatusSucceededSourceWebHardwareA40Total durationCreatedInput
{ "image": "https://replicate.delivery/pbxt/LnJe7KrI5zsCBEcdHAIxrhhP8awgvPI84pt4zJadSwIx3ZUH/demo02.jpg", "auto_rotate": true, "remove_alpha": true }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run garg-aayush/ml-depth-pro using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071", { input: { image: "https://replicate.delivery/pbxt/LnJe7KrI5zsCBEcdHAIxrhhP8awgvPI84pt4zJadSwIx3ZUH/demo02.jpg", auto_rotate: true, remove_alpha: true } } ); // To access the file URL: console.log(output[0].url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run garg-aayush/ml-depth-pro using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071", input={ "image": "https://replicate.delivery/pbxt/LnJe7KrI5zsCBEcdHAIxrhhP8awgvPI84pt4zJadSwIx3ZUH/demo02.jpg", "auto_rotate": True, "remove_alpha": True } ) # To access the file URL: print(output[0].url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output[0].read())
To learn more, take a look at the guide on getting started with Python.
Run garg-aayush/ml-depth-pro using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071", "input": { "image": "https://replicate.delivery/pbxt/LnJe7KrI5zsCBEcdHAIxrhhP8awgvPI84pt4zJadSwIx3ZUH/demo02.jpg", "auto_rotate": true, "remove_alpha": true } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog:brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/garg-aayush/ml-depth-pro@sha256:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071 \ -i 'image="https://replicate.delivery/pbxt/LnJe7KrI5zsCBEcdHAIxrhhP8awgvPI84pt4zJadSwIx3ZUH/demo02.jpg"' \ -i 'auto_rotate=true' \ -i 'remove_alpha=true'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/garg-aayush/ml-depth-pro@sha256:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/LnJe7KrI5zsCBEcdHAIxrhhP8awgvPI84pt4zJadSwIx3ZUH/demo02.jpg", "auto_rotate": true, "remove_alpha": true } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2024-10-14T16:45:59.968862Z", "created_at": "2024-10-14T16:45:56.922000Z", "data_removed": false, "error": null, "id": "rvf1p18h79rgj0cjhfpay3qx5g", "input": { "image": "https://replicate.delivery/pbxt/LnJe7KrI5zsCBEcdHAIxrhhP8awgvPI84pt4zJadSwIx3ZUH/demo02.jpg", "auto_rotate": true, "remove_alpha": true }, "logs": "Visualizing inverse depth in range [0.1m;250m] for better visualization.\noutput_path: /tmp/output.png\nFocal length: 1722.237", "metrics": { "predict_time": 3.039465376, "total_time": 3.046862 }, "output": [ "https://replicate.delivery/pbxt/J1E956WvhdqGJpyvcbXmpTioWo3Q5RAOlSYZqqWesN8j5XzJA/output.png" ], "started_at": "2024-10-14T16:45:56.929397Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/rvf1p18h79rgj0cjhfpay3qx5g", "cancel": "https://api.replicate.com/v1/predictions/rvf1p18h79rgj0cjhfpay3qx5g/cancel" }, "version": "83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071" }
Prediction
garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071IDm8bqpa2sxxrgj0cjhfpa3p60mmStatusSucceededSourceWebHardwareA40Total durationCreatedInput
{ "image": "https://replicate.delivery/pbxt/LnJeOqW32SnSzmSAspAC4Qwr0bJ6nmPtxtRjWK1bAjhjkgAD/example.jpg", "auto_rotate": true, "remove_alpha": true }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run garg-aayush/ml-depth-pro using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071", { input: { image: "https://replicate.delivery/pbxt/LnJeOqW32SnSzmSAspAC4Qwr0bJ6nmPtxtRjWK1bAjhjkgAD/example.jpg", auto_rotate: true, remove_alpha: true } } ); // To access the file URL: console.log(output[0].url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run garg-aayush/ml-depth-pro using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071", input={ "image": "https://replicate.delivery/pbxt/LnJeOqW32SnSzmSAspAC4Qwr0bJ6nmPtxtRjWK1bAjhjkgAD/example.jpg", "auto_rotate": True, "remove_alpha": True } ) # To access the file URL: print(output[0].url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output[0].read())
To learn more, take a look at the guide on getting started with Python.
Run garg-aayush/ml-depth-pro using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071", "input": { "image": "https://replicate.delivery/pbxt/LnJeOqW32SnSzmSAspAC4Qwr0bJ6nmPtxtRjWK1bAjhjkgAD/example.jpg", "auto_rotate": true, "remove_alpha": true } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog:brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/garg-aayush/ml-depth-pro@sha256:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071 \ -i 'image="https://replicate.delivery/pbxt/LnJeOqW32SnSzmSAspAC4Qwr0bJ6nmPtxtRjWK1bAjhjkgAD/example.jpg"' \ -i 'auto_rotate=true' \ -i 'remove_alpha=true'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/garg-aayush/ml-depth-pro@sha256:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/LnJeOqW32SnSzmSAspAC4Qwr0bJ6nmPtxtRjWK1bAjhjkgAD/example.jpg", "auto_rotate": true, "remove_alpha": true } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2024-10-14T16:46:19.934346Z", "created_at": "2024-10-14T16:46:15.535000Z", "data_removed": false, "error": null, "id": "m8bqpa2sxxrgj0cjhfpa3p60mm", "input": { "image": "https://replicate.delivery/pbxt/LnJeOqW32SnSzmSAspAC4Qwr0bJ6nmPtxtRjWK1bAjhjkgAD/example.jpg", "auto_rotate": true, "remove_alpha": true }, "logs": "Visualizing inverse depth in range [0.1m;250m] for better visualization.\noutput_path: /tmp/output.png\nFocal length: 3362.104", "metrics": { "predict_time": 4.39096784, "total_time": 4.399346 }, "output": [ "https://replicate.delivery/pbxt/EmgH5eelvGr480btq9eIxBbkWL56a0be9vnh5fik7btf28r5E/output.png" ], "started_at": "2024-10-14T16:46:15.543378Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/m8bqpa2sxxrgj0cjhfpa3p60mm", "cancel": "https://api.replicate.com/v1/predictions/m8bqpa2sxxrgj0cjhfpa3p60mm/cancel" }, "version": "83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071" }
Prediction
garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071IDtets9fxrk1rgp0cjhfp94d670mStatusSucceededSourceWebHardwareA40Total durationCreatedInput
{ "image": "https://replicate.delivery/pbxt/LnJemJzSntlG4Qto1zRfcQEBPzPxgGqPzNbFb8Nzp3egtE2x/demo07.jpg", "auto_rotate": true, "remove_alpha": true }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run garg-aayush/ml-depth-pro using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071", { input: { image: "https://replicate.delivery/pbxt/LnJemJzSntlG4Qto1zRfcQEBPzPxgGqPzNbFb8Nzp3egtE2x/demo07.jpg", auto_rotate: true, remove_alpha: true } } ); // To access the file URL: console.log(output[0].url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run garg-aayush/ml-depth-pro using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071", input={ "image": "https://replicate.delivery/pbxt/LnJemJzSntlG4Qto1zRfcQEBPzPxgGqPzNbFb8Nzp3egtE2x/demo07.jpg", "auto_rotate": True, "remove_alpha": True } ) # To access the file URL: print(output[0].url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output[0].read())
To learn more, take a look at the guide on getting started with Python.
Run garg-aayush/ml-depth-pro using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "garg-aayush/ml-depth-pro:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071", "input": { "image": "https://replicate.delivery/pbxt/LnJemJzSntlG4Qto1zRfcQEBPzPxgGqPzNbFb8Nzp3egtE2x/demo07.jpg", "auto_rotate": true, "remove_alpha": true } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog:brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/garg-aayush/ml-depth-pro@sha256:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071 \ -i 'image="https://replicate.delivery/pbxt/LnJemJzSntlG4Qto1zRfcQEBPzPxgGqPzNbFb8Nzp3egtE2x/demo07.jpg"' \ -i 'auto_rotate=true' \ -i 'remove_alpha=true'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/garg-aayush/ml-depth-pro@sha256:83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/LnJemJzSntlG4Qto1zRfcQEBPzPxgGqPzNbFb8Nzp3egtE2x/demo07.jpg", "auto_rotate": true, "remove_alpha": true } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2024-10-14T16:46:42.597402Z", "created_at": "2024-10-14T16:46:39.768000Z", "data_removed": false, "error": null, "id": "tets9fxrk1rgp0cjhfp94d670m", "input": { "image": "https://replicate.delivery/pbxt/LnJemJzSntlG4Qto1zRfcQEBPzPxgGqPzNbFb8Nzp3egtE2x/demo07.jpg", "auto_rotate": true, "remove_alpha": true }, "logs": "Visualizing inverse depth in range [0.1m;250m] for better visualization.\noutput_path: /tmp/output.png\nFocal length: 8404.405", "metrics": { "predict_time": 2.820726514, "total_time": 2.829402 }, "output": [ "https://replicate.delivery/pbxt/sRdFifLP6vTTWyonXnUMa1s4ev9W4Gq4laHRIhDKDFIyzvmTA/output.png" ], "started_at": "2024-10-14T16:46:39.776676Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/tets9fxrk1rgp0cjhfp94d670m", "cancel": "https://api.replicate.com/v1/predictions/tets9fxrk1rgp0cjhfp94d670m/cancel" }, "version": "83fcccc9f3d8687cbc33667487888dd9c9bb8779b98f2be6c6811e8620d55071" }
Want to make some of these yourself?
Run this model