It is currently Tue May 21, 2024 1:18 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 3:00 pm  (#1) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
I did this for windows (it might work for linux, not sure, someone might have to change the filepaths into different slashes or something, I don't have linux).

1. install Python (I installed Anaconda)
install pip (if it's not already installed, some documentation says Python comes with pip now)
pip install mechanize (type in a command line/window)
pip install easygui (type in a command line/window)

2. install ImageMagick (used python to call for scaling up and cropping image)

3. extract the .zip below onto your Desktop (or somewhere else). It contains 2 files, one is .py file, the other is the .html it needs to use to submit to deepdreamgenerator.com
Attachment:
deepdreamweb3.zip [1.57 KiB]
Downloaded 300 times


4. from a command line/window, change directory into where you have your zip extracted, type
python deepdreamweb.py
a. It'll prompt you to select an image input file
b. It'll prompt you to find deepdream_submit.html
c. It'll prompt you for number of frames to deepdream before it starts zooming
d. It'll prompt you for number of frames to zoom (it'll deepdream each time it zooms)
e. It'll prompt you for percentage to zoom

That's it and let it run and generate dream_xxxx.jpg (where xxxx is a number starting at 0000)
files into the same directory as your input image.

Image

This is designed for this post: deep dream generator art - post your results here

_________________
TinT


Last edited by trandoductin on Sat Sep 12, 2015 5:40 pm, edited 2 times in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 3:36 pm  (#2) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
sometimes the websubmit would get a bad response. so I added code to repeat trying until successfull in latest version (deepdreamweb2.zip).

_________________
TinT


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 4:25 pm  (#3) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
I like using this script much better than Macro (GhostMouse) method because it's faster and you can still use your computer while this script runs.

_________________
TinT


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 4:39 pm  (#4) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
It seems to sort of work OK in Linux, I did not submit anything but the dialogs appeared.

EDIT: It's not working in Linux when I actually tried to submit an image.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 4:58 pm  (#5) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
Odinbc wrote:
It seems to work OK in Linux, I did not submit anything but the dialogs appeared.

I don't know, if it did run into problems i can only imagine it's the forward and backward slashes...that might cause a problem in filepaths.
You should try it with 1 frame before zoom and 1 frame to zoom so total just 2 frames (only about 30seconds) to test and see if it works on linux too :D

_________________
TinT


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 5:27 pm  (#6) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
I have no idea what you are supposed to do with this so just for the heck of it I ran the dream generator on a picture of a house at the corner. It is cool

Image

Image

_________________
Image


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 5:30 pm  (#7) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
molly wrote:
I have no idea what you are supposed to do with this so just for the heck of it I ran the dream generator on a picture of a house at the corner. It is cool

[ Image ]

[ Image ]

hehee nice.

_________________
TinT


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 5:40 pm  (#8) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
It almost looks like a fun house at a side show.

_________________
Image


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 5:42 pm  (#9) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
there's a bug in the script previously, it was taking the center of zoomed image...i made it center in latest version (deepdreamweb3.zip).

_________________
TinT


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 6:08 pm  (#10) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
This was created before the off-center bug was discovered but i'll share it anyways
www.youtube.com Video from : www.youtube.com


Also you can open multiple command windows and run the script on multiple images to save even more time.
I am running 3 of them right now.

_________________
TinT


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 6:48 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12523
That is beyond awesome Tran. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 6:48 pm  (#12) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12523
Does your script also can repeat without scale (in order to amplify the details)? :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 6:49 pm  (#13) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
lylejk wrote:
That is beyond awesome Tran. :)

i made it for windows, so now you have no excuse to not generate a video :mrgreen:

_________________
TinT


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 6:50 pm  (#14) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
lylejk wrote:
Does your script also can repeat without scale (in order to amplify the details)? :)

yeah just enter how many frames you want for before zoom (this will call deep dream multiple times without scaling)..and enter 1 for zoom (because that's the minimum right now) and delete (not use) the last frame.

_________________
TinT


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 8:52 pm  (#15) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12523
Your web interface works, but when I placed it in my Inkscape python directory, it says missing python26.dll. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 9:00 pm  (#16) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
lylejk wrote:
Your web interface works, but when I placed it in my Inkscape python directory, it says missing python26.dll. :)

not sure what that's about.

_________________
TinT


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 9:36 pm  (#17) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12523
When I double-click the web link, it works. You point to a file and the it feeds that image to the generator. What doesn't work is the python script itself. If I run it, I get the missing dll error. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 9:41 pm  (#18) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
lylejk wrote:
When I double-click the web link, it works. You point to a file and the it feeds that image to the generator. What doesn't work is the python script itself. If I run it, I get the missing dll error. :)

You have to install python, and follow the steps i mentioned.
I don't think you can use it with python that comes with inkscape or gimp.

_________________
TinT


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 9:42 pm  (#19) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12523
Ah; a little reluctance to mess with python full Tran. Oh well. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Deep dream generator automation.
PostPosted: Sat Sep 12, 2015 10:26 pm  (#20) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
Molly's funny house
www.youtube.com Video from : www.youtube.com

_________________
TinT


Top
Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts How much you'd save with automation

0

No new posts Automation / Layer Manipulation

0

No new posts Attachment(s) Deep Dreamed Tiger.

33

No new posts DeOldify A Deep Learning based project for colorizing old images

2

No new posts Colorful Dream

7



* Login  



Powered by phpBB3 © phpBB Group