Deep Dream Generator
Discover what a convolutional neural network can generate by over processing an image and enhancing features. The results is the original input image with a dream-like hallucinogenic appearance.
Exaggerates feature attributes or textures using information that the bvlc_googlenet model learned during training.
Transform your selfies into stunning, studio-quality professional headshots in just minutes!
Try it nowQUICK START API REQUEST
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/deepdream
Scale from zero to the moon (and back) in seconds. Only pay for what you use.
Deploy a ModelExaggerate features in photos and images using this model based off of Google's Deep Dream generator
Discover what it looks like when a neural network "dreams" by processing images through Deep Dream
Make weird images and videos even more weird with the Deep Dream generator.
Discover what a convolutional neural network can generate by over processing an image and enhancing features. The results is the original input image with a dream-like hallucinogenic appearance.
By running inference with this convolutional neural network in reverse after it was trained to detect faces and other objects, the features of an input image become exaggerated and dream-like.
Deep Dream cURL Examples
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/deepdream
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/deepdream
Deep Dream Javascript Examples
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("deepdream", {
image: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("deepdream", {
image: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("deepdream", {
image: fs.createReadStream("/path/to/your/file.jpg"),
});
console.log(resp);
})()
Deep Dream Python Examples
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/deepdream",
data={
'image': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/deepdream",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
Deep Dream Ruby Examples
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/deepdream', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/deepdream', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
}
)
puts r
Deep Dream Csharp Examples
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("deepdream", new {
image = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("deepdream", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
});
Console.Write(api.objectAsJsonString(resp));