megvii-research
/
nafnet
Nonlinear Activation Free Network for Image Restoration
Prediction
megvii-research/nafnet:018241a6Input
{ "image": "https://replicate.delivery/mgxm/4b711712-3c2c-465e-a1a3-57c1de37a47a/blurry.png", "task_type": "Image Debluring (GoPro)" }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run megvii-research/nafnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "megvii-research/nafnet:018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", { input: { image: "https://replicate.delivery/mgxm/4b711712-3c2c-465e-a1a3-57c1de37a47a/blurry.png", task_type: "Image Debluring (GoPro)" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run megvii-research/nafnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "megvii-research/nafnet:018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", input={ "image": "https://replicate.delivery/mgxm/4b711712-3c2c-465e-a1a3-57c1de37a47a/blurry.png", "task_type": "Image Debluring (GoPro)" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run megvii-research/nafnet 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": "018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", "input": { "image": "https://replicate.delivery/mgxm/4b711712-3c2c-465e-a1a3-57c1de37a47a/blurry.png", "task_type": "Image Debluring (GoPro)" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-04-20T09:53:19Z", "created_at": "2022-04-20T09:51:04.795906Z", "data_removed": false, "error": "", "id": "apjmzqde6zdsranuhaksfopzle", "input": { "image": "https://replicate.delivery/mgxm/4b711712-3c2c-465e-a1a3-57c1de37a47a/blurry.png", "task_type": "Image Debluring (GoPro)" }, "logs": "", "metrics": { "total_time": 134.204094 }, "output": "https://replicate.delivery/mgxm/7af1cd44-08e2-4b06-9ffc-259a3cddb93a/output.png", "started_at": "2022-04-20T09:53:19Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/apjmzqde6zdsranuhaksfopzle", "cancel": "https://api.replicate.com/v1/predictions/apjmzqde6zdsranuhaksfopzle/cancel" }, "version": "e116b6df8437d9c562f9de2a86cea6fd76a96705e502f091457926bbe989436c" }
Prediction
megvii-research/nafnet:018241a6Input
{ "image": "https://replicate.delivery/mgxm/3406eb74-0d9d-43b9-807d-177e7f1ac47a/noisy.png", "task_type": "Image Denoising" }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run megvii-research/nafnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "megvii-research/nafnet:018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", { input: { image: "https://replicate.delivery/mgxm/3406eb74-0d9d-43b9-807d-177e7f1ac47a/noisy.png", task_type: "Image Denoising" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run megvii-research/nafnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "megvii-research/nafnet:018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", input={ "image": "https://replicate.delivery/mgxm/3406eb74-0d9d-43b9-807d-177e7f1ac47a/noisy.png", "task_type": "Image Denoising" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run megvii-research/nafnet 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": "018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", "input": { "image": "https://replicate.delivery/mgxm/3406eb74-0d9d-43b9-807d-177e7f1ac47a/noisy.png", "task_type": "Image Denoising" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-04-20T09:55:41.144358Z", "created_at": "2022-04-20T09:55:39.841125Z", "data_removed": false, "error": null, "id": "fhrj4l6lezeoxjkznsueqaonue", "input": { "image": "https://replicate.delivery/mgxm/3406eb74-0d9d-43b9-807d-177e7f1ac47a/noisy.png", "task_type": "Image Denoising" }, "logs": null, "metrics": { "predict_time": 1.132018, "total_time": 1.303233 }, "output": "https://replicate.delivery/mgxm/5cafefb0-5b80-40e1-a072-905dccc1b221/output.png", "started_at": "2022-04-20T09:55:40.012340Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/fhrj4l6lezeoxjkznsueqaonue", "cancel": "https://api.replicate.com/v1/predictions/fhrj4l6lezeoxjkznsueqaonue/cancel" }, "version": "e116b6df8437d9c562f9de2a86cea6fd76a96705e502f091457926bbe989436c" }
Generated inPrediction
megvii-research/nafnet:018241a6IDml2f4ups5nesnf2pc37umca4eiStatusSucceededSourceWebHardware–Total durationCreatedInput
{ "image": "https://replicate.delivery/mgxm/05676b4e-1b00-49b8-9649-d884064063b8/Middlebury_lr_x4_sword2_l.png", "image_r": "https://replicate.delivery/mgxm/08399e91-6d81-4dc6-9f9f-5b420ed7d74b/Middlebury_lr_x4_sword2_r.png", "task_type": "Stereo Image Super-Resolution" }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run megvii-research/nafnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "megvii-research/nafnet:018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", { input: { image: "https://replicate.delivery/mgxm/05676b4e-1b00-49b8-9649-d884064063b8/Middlebury_lr_x4_sword2_l.png", image_r: "https://replicate.delivery/mgxm/08399e91-6d81-4dc6-9f9f-5b420ed7d74b/Middlebury_lr_x4_sword2_r.png", task_type: "Stereo Image Super-Resolution" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run megvii-research/nafnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "megvii-research/nafnet:018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", input={ "image": "https://replicate.delivery/mgxm/05676b4e-1b00-49b8-9649-d884064063b8/Middlebury_lr_x4_sword2_l.png", "image_r": "https://replicate.delivery/mgxm/08399e91-6d81-4dc6-9f9f-5b420ed7d74b/Middlebury_lr_x4_sword2_r.png", "task_type": "Stereo Image Super-Resolution" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run megvii-research/nafnet 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": "018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", "input": { "image": "https://replicate.delivery/mgxm/05676b4e-1b00-49b8-9649-d884064063b8/Middlebury_lr_x4_sword2_l.png", "image_r": "https://replicate.delivery/mgxm/08399e91-6d81-4dc6-9f9f-5b420ed7d74b/Middlebury_lr_x4_sword2_r.png", "task_type": "Stereo Image Super-Resolution" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-04-20T09:56:58.682758Z", "created_at": "2022-04-20T09:56:52.857995Z", "data_removed": false, "error": null, "id": "ml2f4ups5nesnf2pc37umca4ei", "input": { "image": "https://replicate.delivery/mgxm/05676b4e-1b00-49b8-9649-d884064063b8/Middlebury_lr_x4_sword2_l.png", "image_r": "https://replicate.delivery/mgxm/08399e91-6d81-4dc6-9f9f-5b420ed7d74b/Middlebury_lr_x4_sword2_r.png", "task_type": "Stereo Image Super-Resolution" }, "logs": null, "metrics": { "predict_time": 5.606872, "total_time": 5.824763 }, "output": "https://replicate.delivery/mgxm/afd4cc4c-431d-4002-9bae-31332a527805/output.png", "started_at": "2022-04-20T09:56:53.075886Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ml2f4ups5nesnf2pc37umca4ei", "cancel": "https://api.replicate.com/v1/predictions/ml2f4ups5nesnf2pc37umca4ei/cancel" }, "version": "e116b6df8437d9c562f9de2a86cea6fd76a96705e502f091457926bbe989436c" }
Generated inPrediction
megvii-research/nafnet:018241a6IDa6ir4qw53jcpnkeiq2bcci6ebyStatusSucceededSourceWebHardware–Total durationCreatedInput
{ "image": "https://replicate.delivery/mgxm/1ca1e7fe-06a0-4d0c-8b8b-496674fa140b/blurry-demo-1.png", "task_type": "Image Debluring (GoPro)" }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run megvii-research/nafnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "megvii-research/nafnet:018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", { input: { image: "https://replicate.delivery/mgxm/1ca1e7fe-06a0-4d0c-8b8b-496674fa140b/blurry-demo-1.png", task_type: "Image Debluring (GoPro)" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run megvii-research/nafnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "megvii-research/nafnet:018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", input={ "image": "https://replicate.delivery/mgxm/1ca1e7fe-06a0-4d0c-8b8b-496674fa140b/blurry-demo-1.png", "task_type": "Image Debluring (GoPro)" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run megvii-research/nafnet 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": "018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", "input": { "image": "https://replicate.delivery/mgxm/1ca1e7fe-06a0-4d0c-8b8b-496674fa140b/blurry-demo-1.png", "task_type": "Image Debluring (GoPro)" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-04-20T09:57:33Z", "created_at": "2022-04-20T09:57:30.909441Z", "data_removed": false, "error": "", "id": "a6ir4qw53jcpnkeiq2bcci6eby", "input": { "image": "https://replicate.delivery/mgxm/1ca1e7fe-06a0-4d0c-8b8b-496674fa140b/blurry-demo-1.png", "task_type": "Image Debluring (GoPro)" }, "logs": "", "metrics": { "predict_time": 2, "total_time": 2.090559 }, "output": "https://replicate.delivery/mgxm/da1df32e-44e5-49bc-848f-9405f982078d/output.png", "started_at": "2022-04-20T09:57:31Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/a6ir4qw53jcpnkeiq2bcci6eby", "cancel": "https://api.replicate.com/v1/predictions/a6ir4qw53jcpnkeiq2bcci6eby/cancel" }, "version": "e116b6df8437d9c562f9de2a86cea6fd76a96705e502f091457926bbe989436c" }
Generated inPrediction
megvii-research/nafnet:018241a6IDt4qtxogfkrevxgrbc5dlyostniStatusSucceededSourceWebHardware–Total durationCreatedInput
{ "image": "https://replicate.delivery/mgxm/0c883ffd-6b6f-46b0-b1aa-0962f7206389/noisy-demo-1.png", "task_type": "Image Denoising" }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run megvii-research/nafnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "megvii-research/nafnet:018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", { input: { image: "https://replicate.delivery/mgxm/0c883ffd-6b6f-46b0-b1aa-0962f7206389/noisy-demo-1.png", task_type: "Image Denoising" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run megvii-research/nafnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "megvii-research/nafnet:018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", input={ "image": "https://replicate.delivery/mgxm/0c883ffd-6b6f-46b0-b1aa-0962f7206389/noisy-demo-1.png", "task_type": "Image Denoising" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run megvii-research/nafnet 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": "018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", "input": { "image": "https://replicate.delivery/mgxm/0c883ffd-6b6f-46b0-b1aa-0962f7206389/noisy-demo-1.png", "task_type": "Image Denoising" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-04-20T09:57:53.626834Z", "created_at": "2022-04-20T09:57:52.397628Z", "data_removed": false, "error": null, "id": "t4qtxogfkrevxgrbc5dlyostni", "input": { "image": "https://replicate.delivery/mgxm/0c883ffd-6b6f-46b0-b1aa-0962f7206389/noisy-demo-1.png", "task_type": "Image Denoising" }, "logs": null, "metrics": { "predict_time": 1.057071, "total_time": 1.229206 }, "output": "https://replicate.delivery/mgxm/26421313-6cee-4c58-b818-67ce8b67250a/output.png", "started_at": "2022-04-20T09:57:52.569763Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/t4qtxogfkrevxgrbc5dlyostni", "cancel": "https://api.replicate.com/v1/predictions/t4qtxogfkrevxgrbc5dlyostni/cancel" }, "version": "e116b6df8437d9c562f9de2a86cea6fd76a96705e502f091457926bbe989436c" }
Generated inPrediction
megvii-research/nafnet:018241a6IDfmyre5gi4zcv3n65e47zg7o5raStatusSucceededSourceWebHardware–Total durationCreatedInput
{ "image": "https://replicate.delivery/mgxm/f2e1fb0a-bc6f-4884-be93-ee9ec0c3babb/Flickr1024_lr_x4_0035_l.png", "image_r": "https://replicate.delivery/mgxm/b3a5f8d8-b99f-4c9a-ad4d-33762d35c127/Flickr1024_lr_x4_0035_r.png", "task_type": "Stereo Image Super-Resolution" }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run megvii-research/nafnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "megvii-research/nafnet:018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", { input: { image: "https://replicate.delivery/mgxm/f2e1fb0a-bc6f-4884-be93-ee9ec0c3babb/Flickr1024_lr_x4_0035_l.png", image_r: "https://replicate.delivery/mgxm/b3a5f8d8-b99f-4c9a-ad4d-33762d35c127/Flickr1024_lr_x4_0035_r.png", task_type: "Stereo Image Super-Resolution" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run megvii-research/nafnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "megvii-research/nafnet:018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", input={ "image": "https://replicate.delivery/mgxm/f2e1fb0a-bc6f-4884-be93-ee9ec0c3babb/Flickr1024_lr_x4_0035_l.png", "image_r": "https://replicate.delivery/mgxm/b3a5f8d8-b99f-4c9a-ad4d-33762d35c127/Flickr1024_lr_x4_0035_r.png", "task_type": "Stereo Image Super-Resolution" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run megvii-research/nafnet 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": "018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", "input": { "image": "https://replicate.delivery/mgxm/f2e1fb0a-bc6f-4884-be93-ee9ec0c3babb/Flickr1024_lr_x4_0035_l.png", "image_r": "https://replicate.delivery/mgxm/b3a5f8d8-b99f-4c9a-ad4d-33762d35c127/Flickr1024_lr_x4_0035_r.png", "task_type": "Stereo Image Super-Resolution" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-04-20T09:58:26.687323Z", "created_at": "2022-04-20T09:58:12.655528Z", "data_removed": false, "error": null, "id": "fmyre5gi4zcv3n65e47zg7o5ra", "input": { "image": "https://replicate.delivery/mgxm/f2e1fb0a-bc6f-4884-be93-ee9ec0c3babb/Flickr1024_lr_x4_0035_l.png", "image_r": "https://replicate.delivery/mgxm/b3a5f8d8-b99f-4c9a-ad4d-33762d35c127/Flickr1024_lr_x4_0035_r.png", "task_type": "Stereo Image Super-Resolution" }, "logs": null, "metrics": { "predict_time": 13.849906, "total_time": 14.031795 }, "output": "https://replicate.delivery/mgxm/122bc7fa-a30c-461b-a449-f5492a04baed/output.png", "started_at": "2022-04-20T09:58:12.837417Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/fmyre5gi4zcv3n65e47zg7o5ra", "cancel": "https://api.replicate.com/v1/predictions/fmyre5gi4zcv3n65e47zg7o5ra/cancel" }, "version": "e116b6df8437d9c562f9de2a86cea6fd76a96705e502f091457926bbe989436c" }
Generated inPrediction
megvii-research/nafnet:018241a6Input
{ "image": "https://replicate.delivery/mgxm/e7a66188-34c6-483b-813f-be5c96a3952b/blurry-reds-0.jpg", "task_type": "Image Debluring (REDS)" }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run megvii-research/nafnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "megvii-research/nafnet:018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", { input: { image: "https://replicate.delivery/mgxm/e7a66188-34c6-483b-813f-be5c96a3952b/blurry-reds-0.jpg", task_type: "Image Debluring (REDS)" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run megvii-research/nafnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "megvii-research/nafnet:018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", input={ "image": "https://replicate.delivery/mgxm/e7a66188-34c6-483b-813f-be5c96a3952b/blurry-reds-0.jpg", "task_type": "Image Debluring (REDS)" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run megvii-research/nafnet 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": "018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7", "input": { "image": "https://replicate.delivery/mgxm/e7a66188-34c6-483b-813f-be5c96a3952b/blurry-reds-0.jpg", "task_type": "Image Debluring (REDS)" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-04-27T09:09:57.708895Z", "created_at": "2022-04-27T09:04:55.208433Z", "data_removed": false, "error": null, "id": "ywr4vpd65jetnfzxsk6fjod2va", "input": { "image": "https://replicate.delivery/mgxm/e7a66188-34c6-483b-813f-be5c96a3952b/blurry-reds-0.jpg", "task_type": "Image Debluring (REDS)" }, "logs": null, "metrics": { "predict_time": 1.912291, "total_time": 302.500462 }, "output": "https://replicate.delivery/mgxm/60bdfe42-b179-40fb-81b0-fa3ec0090aea/output.png", "started_at": "2022-04-27T09:09:55.796604Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ywr4vpd65jetnfzxsk6fjod2va", "cancel": "https://api.replicate.com/v1/predictions/ywr4vpd65jetnfzxsk6fjod2va/cancel" }, "version": "018241a6c880319404eaa2714b764313e27e11f950a7ff0a7b5b37b27b74dcf7" }
Generated in
Want to make some of these yourself?
Run this model