Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Render the image using the DeepDream-α algorithm
ResourceFunction["DeepDreamAlpha"][image] renders image using the deepdream-α algorithm. | |
ResourceFunction["DeepDreamAlpha"][image,n] renders image using n iterations. |
| "Depth" | 24 | network activation depth |
| "StepSize" | 1 | step size of each pattern overlay iteration |
| TargetDevice | "CPU" | works same as NetChain |
| WorkingPrecision | "Real32" | works same as NetChain |
Start with an image:
| In[1]:= |
| Out[1]= | ![]() |
Now process it with DeepDreamAlpha:
| In[2]:= |
| Out[2]= | ![]() |
Use GPU acceleration:
| In[3]:= | ![]() |
| Out[3]= | ![]() |
The activation depth is an integer between 1 and 30. The default is to activate layer 24. Shallow layers tend to be fine textures, while deep layers tend to be abstract patterns:
| In[4]:= | ![]() |
| Out[4]= | ![]() |
The smaller the step size, the smoother the final result will be:
| In[5]:= | ![]() |
| Out[5]= | ![]() |
| In[6]:= | ![]() |
| Out[6]= | ![]() |
Note that due to the accumulation of errors, the results are completely different:
| In[7]:= |
| Out[7]= |
Render high-resolution images on the GPU and observe the effect:
| In[8]:= |
| Out[8]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License