✋ This model is not published yet.
You can claim this model if you're @progamergov on GitHub. Contact us.
progamergov / neural-dream
PyTorch implementation of DeepDream algorithm
Prediction
progamergov/neural-dream:b6cd9f88a4dc743f38570bd3b354f8e00f544f98fc2145822eb1c70f4872cec2ID5golm7qulfaexitxn2kvlkecouStatusSucceededSourceWebHardware–Total duration–CreatedInput
{ "seed": "-1", "input": "https://replicate.delivery/mgxm/7a8efd28-eafd-4873-b124-820ce80956b2/frida_kahlo.jpg", "tv_weight": "0.0", "channel_mode": "all", "dream_weight": "1000", "num_iterations": "10", "original_colors": "0" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run progamergov/neural-dream using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "progamergov/neural-dream:b6cd9f88a4dc743f38570bd3b354f8e00f544f98fc2145822eb1c70f4872cec2", { input: { seed: "-1", input: "https://replicate.delivery/mgxm/7a8efd28-eafd-4873-b124-820ce80956b2/frida_kahlo.jpg", tv_weight: "0.0", channel_mode: "all", dream_weight: "1000", num_iterations: "10", original_colors: "0" } } ); 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
Import the client:import replicate
Run progamergov/neural-dream using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "progamergov/neural-dream:b6cd9f88a4dc743f38570bd3b354f8e00f544f98fc2145822eb1c70f4872cec2", input={ "seed": "-1", "input": "https://replicate.delivery/mgxm/7a8efd28-eafd-4873-b124-820ce80956b2/frida_kahlo.jpg", "tv_weight": "0.0", "channel_mode": "all", "dream_weight": "1000", "num_iterations": "10", "original_colors": "0" } ) # The progamergov/neural-dream model can stream output as it's running. # The predict method returns an iterator, and you can iterate over that output. for item in output: # https://replicate.com/progamergov/neural-dream/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run progamergov/neural-dream 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": "progamergov/neural-dream:b6cd9f88a4dc743f38570bd3b354f8e00f544f98fc2145822eb1c70f4872cec2", "input": { "seed": "-1", "input": "https://replicate.delivery/mgxm/7a8efd28-eafd-4873-b124-820ce80956b2/frida_kahlo.jpg", "tv_weight": "0.0", "channel_mode": "all", "dream_weight": "1000", "num_iterations": "10", "original_colors": "0" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2021-09-24T12:46:56.693001Z", "created_at": "2021-09-24T12:44:57.997556Z", "data_removed": false, "error": null, "id": "5golm7qulfaexitxn2kvlkecou", "input": { "seed": "-1", "input": "https://replicate.delivery/mgxm/7a8efd28-eafd-4873-b124-820ce80956b2/frida_kahlo.jpg", "tv_weight": "0.0", "channel_mode": "all", "dream_weight": "1000", "num_iterations": "10", "original_colors": "0" }, "logs": "Setting up dream layer 1: inception_4d_3x3_reduce\nRunning optimization with ADAM\n\nPerforming 2 octaves with the following image sizes:\n Octave 1 image size: 307x235\n Octave 2 image size: 512x393\nIteration 1 / 10\n DeepDream 1 loss: 81400896.0\n Total loss: 3259492676.5\nIteration 2 / 10\n DeepDream 1 loss: 97071088.0\n Total loss: 4214811338.0\nIteration 3 / 10\n DeepDream 1 loss: 98655964.0\n Total loss: 4586946526.0\nIteration 4 / 10\n DeepDream 1 loss: 104285372.0\n Total loss: 4833674384.0\nIteration 5 / 10\n DeepDream 1 loss: 108082668.0\n Total loss: 4969859614.0\nIteration 6 / 10\n DeepDream 1 loss: 107974264.0\n Total loss: 5090874810.0\nIteration 7 / 10\n DeepDream 1 loss: 108669320.0\n Total loss: 5159182644.0\nIteration 8 / 10\n DeepDream 1 loss: 113264032.0\n Total loss: 5259398500.0\nIteration 9 / 10\n DeepDream 1 loss: 111313352.0\n Total loss: 5314823072.0\nIteration 10 / 10\n DeepDream 1 loss: 112714984.0\n Total loss: 5381710628.0", "metrics": {}, "output": [ { "file": "https://replicate.delivery/mgxm/35c5c688-706c-46c9-bc8c-5958277897b2/output.png" } ], "started_at": null, "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/5golm7qulfaexitxn2kvlkecou", "cancel": "https://api.replicate.com/v1/predictions/5golm7qulfaexitxn2kvlkecou/cancel" }, "version": "b6cd9f88a4dc743f38570bd3b354f8e00f544f98fc2145822eb1c70f4872cec2" }
Setting up dream layer 1: inception_4d_3x3_reduce Running optimization with ADAM Performing 2 octaves with the following image sizes: Octave 1 image size: 307x235 Octave 2 image size: 512x393 Iteration 1 / 10 DeepDream 1 loss: 81400896.0 Total loss: 3259492676.5 Iteration 2 / 10 DeepDream 1 loss: 97071088.0 Total loss: 4214811338.0 Iteration 3 / 10 DeepDream 1 loss: 98655964.0 Total loss: 4586946526.0 Iteration 4 / 10 DeepDream 1 loss: 104285372.0 Total loss: 4833674384.0 Iteration 5 / 10 DeepDream 1 loss: 108082668.0 Total loss: 4969859614.0 Iteration 6 / 10 DeepDream 1 loss: 107974264.0 Total loss: 5090874810.0 Iteration 7 / 10 DeepDream 1 loss: 108669320.0 Total loss: 5159182644.0 Iteration 8 / 10 DeepDream 1 loss: 113264032.0 Total loss: 5259398500.0 Iteration 9 / 10 DeepDream 1 loss: 111313352.0 Total loss: 5314823072.0 Iteration 10 / 10 DeepDream 1 loss: 112714984.0 Total loss: 5381710628.0
Prediction
progamergov/neural-dream:6ff652efc91cc816ae898f6132048f523cf9f0add7dca4481e940fb9257483b6IDxg4cwksuqna5jbxxb4jg4plrb4StatusSucceededSourceWebHardware–Total duration–CreatedInput
{ "seed": "-1", "input": "https://replicate.delivery/mgxm/b3a56838-e15a-4c02-b750-06bb164634ba/proca.png", "tv_weight": "0.0", "channel_mode": "all", "dream_weight": "1000", "num_iterations": "10", "original_colors": "0" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run progamergov/neural-dream using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "progamergov/neural-dream:6ff652efc91cc816ae898f6132048f523cf9f0add7dca4481e940fb9257483b6", { input: { seed: "-1", input: "https://replicate.delivery/mgxm/b3a56838-e15a-4c02-b750-06bb164634ba/proca.png", tv_weight: "0.0", channel_mode: "all", dream_weight: "1000", num_iterations: "10", original_colors: "0" } } ); 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
Import the client:import replicate
Run progamergov/neural-dream using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "progamergov/neural-dream:6ff652efc91cc816ae898f6132048f523cf9f0add7dca4481e940fb9257483b6", input={ "seed": "-1", "input": "https://replicate.delivery/mgxm/b3a56838-e15a-4c02-b750-06bb164634ba/proca.png", "tv_weight": "0.0", "channel_mode": "all", "dream_weight": "1000", "num_iterations": "10", "original_colors": "0" } ) # The progamergov/neural-dream model can stream output as it's running. # The predict method returns an iterator, and you can iterate over that output. for item in output: # https://replicate.com/progamergov/neural-dream/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run progamergov/neural-dream 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": "progamergov/neural-dream:6ff652efc91cc816ae898f6132048f523cf9f0add7dca4481e940fb9257483b6", "input": { "seed": "-1", "input": "https://replicate.delivery/mgxm/b3a56838-e15a-4c02-b750-06bb164634ba/proca.png", "tv_weight": "0.0", "channel_mode": "all", "dream_weight": "1000", "num_iterations": "10", "original_colors": "0" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2021-09-24T15:03:12.343802Z", "created_at": "2021-09-24T14:55:42.239163Z", "data_removed": false, "error": null, "id": "xg4cwksuqna5jbxxb4jg4plrb4", "input": { "seed": "-1", "input": "https://replicate.delivery/mgxm/b3a56838-e15a-4c02-b750-06bb164634ba/proca.png", "tv_weight": "0.0", "channel_mode": "all", "dream_weight": "1000", "num_iterations": "10", "original_colors": "0" }, "logs": "Setting up dream layer 1: inception_4d_3x3_reduce\nRunning optimization with ADAM\n\nPerforming 2 octaves with the following image sizes:\n Octave 1 image size: 505x357\n Octave 2 image size: 842x596\nIteration 1 / 10\n DeepDream 1 loss: 100156872.0\n Total loss: 3748305645.0\nIteration 2 / 10\n DeepDream 1 loss: 124729064.0\n Total loss: 5330978052.0\nIteration 3 / 10\n DeepDream 1 loss: 138247892.0\n Total loss: 6004522012.0\nIteration 4 / 10\n DeepDream 1 loss: 144882396.0\n Total loss: 6390906548.0\nIteration 5 / 10\n DeepDream 1 loss: 146442828.0\n Total loss: 6655614204.0\nIteration 6 / 10\n DeepDream 1 loss: 151087448.0\n Total loss: 6892330456.0\nIteration 7 / 10\n DeepDream 1 loss: 155934260.0\n Total loss: 7026120272.0\nIteration 8 / 10\n DeepDream 1 loss: 153492904.0\n Total loss: 7139197068.0\nIteration 9 / 10\n DeepDream 1 loss: 153797152.0\n Total loss: 7263653732.0\nIteration 10 / 10\n DeepDream 1 loss: 156642656.0\n Total loss: 7362394592.0", "metrics": {}, "output": [ { "file": "https://replicate.delivery/mgxm/72607d5e-62b8-46fd-bab1-2c6826d6b2ba/output.png" } ], "started_at": null, "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/xg4cwksuqna5jbxxb4jg4plrb4", "cancel": "https://api.replicate.com/v1/predictions/xg4cwksuqna5jbxxb4jg4plrb4/cancel" }, "version": "6ff652efc91cc816ae898f6132048f523cf9f0add7dca4481e940fb9257483b6" }
Setting up dream layer 1: inception_4d_3x3_reduce Running optimization with ADAM Performing 2 octaves with the following image sizes: Octave 1 image size: 505x357 Octave 2 image size: 842x596 Iteration 1 / 10 DeepDream 1 loss: 100156872.0 Total loss: 3748305645.0 Iteration 2 / 10 DeepDream 1 loss: 124729064.0 Total loss: 5330978052.0 Iteration 3 / 10 DeepDream 1 loss: 138247892.0 Total loss: 6004522012.0 Iteration 4 / 10 DeepDream 1 loss: 144882396.0 Total loss: 6390906548.0 Iteration 5 / 10 DeepDream 1 loss: 146442828.0 Total loss: 6655614204.0 Iteration 6 / 10 DeepDream 1 loss: 151087448.0 Total loss: 6892330456.0 Iteration 7 / 10 DeepDream 1 loss: 155934260.0 Total loss: 7026120272.0 Iteration 8 / 10 DeepDream 1 loss: 153492904.0 Total loss: 7139197068.0 Iteration 9 / 10 DeepDream 1 loss: 153797152.0 Total loss: 7263653732.0 Iteration 10 / 10 DeepDream 1 loss: 156642656.0 Total loss: 7362394592.0
Prediction
progamergov/neural-dream:6ff652efc91cc816ae898f6132048f523cf9f0add7dca4481e940fb9257483b6IDsxmf3ilk6bg4jkrflivudbejemStatusSucceededSourceWebHardware–Total duration–CreatedInput
{ "seed": "-1", "input": "https://replicate.delivery/mgxm/590ccab9-fb74-40fe-9832-5af3b1ebdf6c/brad_pitt.jpg", "tv_weight": "0.0", "channel_mode": "all", "dream_weight": "1000", "num_iterations": "10", "original_colors": "0" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run progamergov/neural-dream using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "progamergov/neural-dream:6ff652efc91cc816ae898f6132048f523cf9f0add7dca4481e940fb9257483b6", { input: { seed: "-1", input: "https://replicate.delivery/mgxm/590ccab9-fb74-40fe-9832-5af3b1ebdf6c/brad_pitt.jpg", tv_weight: "0.0", channel_mode: "all", dream_weight: "1000", num_iterations: "10", original_colors: "0" } } ); 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
Import the client:import replicate
Run progamergov/neural-dream using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "progamergov/neural-dream:6ff652efc91cc816ae898f6132048f523cf9f0add7dca4481e940fb9257483b6", input={ "seed": "-1", "input": "https://replicate.delivery/mgxm/590ccab9-fb74-40fe-9832-5af3b1ebdf6c/brad_pitt.jpg", "tv_weight": "0.0", "channel_mode": "all", "dream_weight": "1000", "num_iterations": "10", "original_colors": "0" } ) # The progamergov/neural-dream model can stream output as it's running. # The predict method returns an iterator, and you can iterate over that output. for item in output: # https://replicate.com/progamergov/neural-dream/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run progamergov/neural-dream 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": "progamergov/neural-dream:6ff652efc91cc816ae898f6132048f523cf9f0add7dca4481e940fb9257483b6", "input": { "seed": "-1", "input": "https://replicate.delivery/mgxm/590ccab9-fb74-40fe-9832-5af3b1ebdf6c/brad_pitt.jpg", "tv_weight": "0.0", "channel_mode": "all", "dream_weight": "1000", "num_iterations": "10", "original_colors": "0" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2021-09-24T15:32:19.989570Z", "created_at": "2021-09-24T15:27:33.447785Z", "data_removed": false, "error": null, "id": "sxmf3ilk6bg4jkrflivudbejem", "input": { "seed": "-1", "input": "https://replicate.delivery/mgxm/590ccab9-fb74-40fe-9832-5af3b1ebdf6c/brad_pitt.jpg", "tv_weight": "0.0", "channel_mode": "all", "dream_weight": "1000", "num_iterations": "10", "original_colors": "0" }, "logs": "Setting up dream layer 1: inception_4d_3x3_reduce\nRunning optimization with ADAM\n\nPerforming 2 octaves with the following image sizes:\n Octave 1 image size: 885x700\n Octave 2 image size: 1475x1168\nIteration 1 / 10\n DeepDream 1 loss: 224298584.0\n Total loss: 8401168024.0\nIteration 2 / 10\n DeepDream 1 loss: 264917136.0\n Total loss: 11576339748.0\nIteration 3 / 10\n DeepDream 1 loss: 292927072.0\n Total loss: 12912555384.0\nIteration 4 / 10\n DeepDream 1 loss: 297045984.0\n Total loss: 13649609280.0\nIteration 5 / 10\n DeepDream 1 loss: 309348632.0\n Total loss: 14161671512.0\nIteration 6 / 10\n DeepDream 1 loss: 318047912.0\n Total loss: 14490108544.0\nIteration 7 / 10\n DeepDream 1 loss: 321688224.0\n Total loss: 14792191040.0\nIteration 8 / 10\n DeepDream 1 loss: 318154920.0\n Total loss: 15025853576.0\nIteration 9 / 10\n DeepDream 1 loss: 329723480.0\n Total loss: 15219739288.0\nIteration 10 / 10\n DeepDream 1 loss: 327265472.0\n Total loss: 15402330520.0", "metrics": {}, "output": [ { "file": "https://replicate.delivery/mgxm/9668d1c4-ea46-4e6b-ad47-e25ffc0b18d8/output.png" } ], "started_at": null, "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/sxmf3ilk6bg4jkrflivudbejem", "cancel": "https://api.replicate.com/v1/predictions/sxmf3ilk6bg4jkrflivudbejem/cancel" }, "version": "6ff652efc91cc816ae898f6132048f523cf9f0add7dca4481e940fb9257483b6" }
Setting up dream layer 1: inception_4d_3x3_reduce Running optimization with ADAM Performing 2 octaves with the following image sizes: Octave 1 image size: 885x700 Octave 2 image size: 1475x1168 Iteration 1 / 10 DeepDream 1 loss: 224298584.0 Total loss: 8401168024.0 Iteration 2 / 10 DeepDream 1 loss: 264917136.0 Total loss: 11576339748.0 Iteration 3 / 10 DeepDream 1 loss: 292927072.0 Total loss: 12912555384.0 Iteration 4 / 10 DeepDream 1 loss: 297045984.0 Total loss: 13649609280.0 Iteration 5 / 10 DeepDream 1 loss: 309348632.0 Total loss: 14161671512.0 Iteration 6 / 10 DeepDream 1 loss: 318047912.0 Total loss: 14490108544.0 Iteration 7 / 10 DeepDream 1 loss: 321688224.0 Total loss: 14792191040.0 Iteration 8 / 10 DeepDream 1 loss: 318154920.0 Total loss: 15025853576.0 Iteration 9 / 10 DeepDream 1 loss: 329723480.0 Total loss: 15219739288.0 Iteration 10 / 10 DeepDream 1 loss: 327265472.0 Total loss: 15402330520.0
Want to make some of these yourself?
Run this model