Giter VIP home page Giter VIP logo

drmly's Introduction

drmly is a cross platform web interface for creatively running deep dream on anything with pixels.

Are you an artist looking to use dd to do art? This project's goal is make that easy for you! Pull requests and issues are welcome here.

Alt Text

Gifs made with drmly: (to see vids go to http://reddit.com/r/deepdreamvideo)

Shapes Human Celebrity Wrestling


Requirements:

Tensorflow (pip install tensorflow, or for an optimized version, use a .whl for your OS) possible shortcuts to get an optimized tensorflow installation: some whl's for tensorflow here: https://github.com/lakshayg/tensorflow-build and more to be found at http://ci.tensorflow.org

cv2

ffmpeg

ffprobe (probably installed along with ffmpeg)

wget

python3

go

Optional requirements:

youtube-dl

dep


Installation:

go get -u github.com/drmly/drmly

cd $GOPATH/src/github.com/drmly/drmly

go install

drmly


Usage

point browser to localhost:8080

(because we need to download the Inception model, the first time running a job python will download a 53 megabyte tensorflow_inception_graph.pb into the drmly/models dir)

If you have any problems, watch the terminal output from drmly, if there's errors they will be listed as error


Filetypes supported:

Tries to support anything with pixels automatically, videos of any extension, gifs, and images of course. Suggest a new filetype


Want to make pixels on your cell phone from exotic locations and send the job to your computer at home?

download https://ngrok.com/download -> start it with:

./ngrok http 8080

ånd then your terminal will display the ngrok url to use on your cell phone, for example: http://c55d5584.ngrok.io Type that into your phone and then you should see the bind localhost:8080 web portal running on your local computer.


Clipboard Support

Bind also works with youtube-dl, allowing you to run jobs from the clipboard on youtube-dl compliant URL's. Just copy any semi popular website and customize the job at localhost:8080. Make sure the checkbox yt-dl clipboard is checked.


Screenshot Support

Any image files added to the Desktop will automatically be randomly deep dreamed. Turn this feature off by commenting out or deleting screenshot.go

Want to do batch jobs? You can also download or move many images at once to the desktop and drmly will finish one at a time.


OSX tensorflow-gpu installation guide (this is an optional optimization, only suggested if you're running many jobs)

Tf doesn't support GPU on Macs out of the box (after v1.1). There are several solutions to this problem, and lot's of blog posts out there to consider. Imo the best place to start figuring this out is to find and install the perfect .whl for your OS version (10.12, 10.11, 10.9, etc...), and then install CUDA and Cudnn after that. That's because every .whl you find out there is going to have different Cuda and Cudnn versions that it wants. Why not install from source? It's slow and unnecessary to be building the .whl yourself from source (which is what most articles focus on). Also, be aware that you'll be wanting to use a .whl that supports your Cuda Compute Capability, in my case I'm running a Geforce 650M which has a 3.0 Cuda Compute Capability. This .whl works for my system:

sudo pip install --upgrade https://github.com/bodak/tensorflow-wheels/releases/download/v1.1.0/tensorflow-1.1.0_GPU-cp36-cp36m-macosx_10_7_x86_64.whl

Now, assuming you didn't get an error that this .whl is not for your OSX version, move on to the next step.

We can see from this github page that we need to install specific CUDA and Cudnn versions, 8.0 and 5.1 respectively.

Next, Looking at this guide you'll see some environmental variables should be set.

If you don't get errors when you run:

python3 test.py (test.py is located within this github projec)

then you are running TF on a mac GPU, impressive!

At this point you shouldn't get any rpath libcudart8.0.0.dylib Image not found errors (or similar errors). If you do let us know

***If this doesn't work easily, I'd recommend reverting back to the CPU .whl presented near the top of this README. Or, just run pip install tensorflow (not optimized, but acceptable for exploration or low numbers of jobs)

Improve this guide



We use

https://github.com/git-up/GitUp/wiki/Using-GitUp-Advanced-Commit-View

https://github.com/Microsoft/vscode-go


Roadmap

√ Optical flow (see code at: https://github.com/ksk-S/DeepDreamVideoOpticalFlow/blob/master/dreamer.py)

√ More parameters and more parameter automations implemented

√ Explore creative approaches to using ML in art


Developing

Development mode started with d argument

drmly d

drmly's People

Contributors

jennnybuckley avatar tablemountain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drmly's Issues

Python "borks" after 1 minute

Traceback (most recent call last):
  File "folder.py", line 255, in <module>
    deep_dream(model_path, args.output)
  File "folder.py", line 157, in deep_dream
    loss = tf.reduce_mean(t_obj)
  File "/home/willem/.local/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py", line 1411, in reduce_mean
    name=name)
  File "/home/willem/.local/lib/python3.6/site-packages/tensorflow/python/ops/gen_math_ops.py", line 2568, in _mean
    keep_dims=keep_dims, name=name)
  File "/home/willem/.local/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 350, in _apply_op_helper
    g = ops._get_graph_from_inputs(_Flatten(keywords.values()))
  File "/home/willem/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 4636, in _get_graph_from_inputs
    _assert_same_graph(original_graph_element, graph_element)
  File "/home/willem/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 4572, in _assert_same_graph
    original_item))
ValueError: Tensor("Const:0", shape=(3,), dtype=int32) must be from the same graph as Tensor("strided_slice_2:0", shape=(?, ?, ?), dtype=float32).

This happened with a ~10 second webm

Error when launching drmly

I got issues when launching drmly after having installing it and restarted my computer.

"failed to know who is running the app, err: exec: \"who\": executable file not found in %PATH%"

I use Windows 10.

EDIT:

I reinstalled drmly, it worked

cannot launch drmly

I have followed all of the instructions on the readme and everything appeared to work until the last step

I tried these two things and not sure what else I can try to do, I am not Linux savvy..

[max@max ~]$ drmly
bash: drmly: command not found

[max@max ~]$ /home/max/go/bin/drmly
(drmly:1816): Gtk-WARNING **: 06:48:43.741: Theme parsing error: gtk.css:68:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version

(drmly:1816): Gtk-WARNING **: 06:48:43.741: Theme parsing error: gtk.css:69:35: The style property GtkButton:child-displacement-y is deprecated and shouldn't be used anymore. It will be removed in a future version

(drmly:1816): Gtk-WARNING **: 06:48:43.741: Theme parsing error: gtk.css:70:34: The style property GtkCheckButton:indicator-size is deprecated and shouldn't be used anymore. It will be removed in a future version

(drmly:1816): Gtk-WARNING **: 06:48:43.741: Theme parsing error: gtk.css:71:36: The style property GtkCheckMenuItem:indicator-size is deprecated and shouldn't be used anymore. It will be removed in a future version

(drmly:1816): Gtk-WARNING **: 06:48:43.741: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version

(drmly:1816): Gtk-WARNING **: 06:48:43.741: Theme parsing error: gtk.css:83:29: The style property GtkStatusbar:shadow-type is deprecated and shouldn't be used anymore. It will be removed in a future version
INFO[0000] click this: http://localhost:8080
INFO[0000] dir of bind is /home/max/go/bin
INFO[0000] Hello max <3100LTC
INFO[0000] ====
INFO[0000] Id: 1000
INFO[0000] Username: max
INFO[0000] Home Dir: /home/max
INFO[0000] this is the normal user: max
INFO[0000] bind folder basePath: /home/max/Desktop/bind
dir is /home/max/go/bin
INFO[0000] skipping copying templates dirstat /home/max/go/bin/public: no such file or directory
INFO[0000] bind dirs ensured!
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.

  • using env: export GIN_MODE=release
  • using code: gin.SetMode(gin.ReleaseMode)

panic: html/template: pattern matches no files: /home/max/Desktop/bind/public/tmpl/*.html

goroutine 1 [running]:
html/template.Must(...)
/usr/lib/go/src/html/template/template.go:372
github.com/gin-gonic/gin.(*Engine).LoadHTMLGlob(0xc000116dc0, 0xc00002c210, 0x29)
/home/max/go/src/github.com/gin-gonic/gin/gin.go:185 +0x362
main.InitializeServer(0xc6d40e, 0xc, 0x4e35e6)
/home/max/go/src/github.com/drmly/drmly/server.go:35 +0x257
main.web()
/home/max/go/src/github.com/drmly/drmly/server.go:19 +0x3a
main.(*Service).Manage(0xc00032ff18, 0xb, 0xc82e84, 0x2c, 0x138d570)
/home/max/go/src/github.com/drmly/drmly/daemon.go:62 +0x107
main.main()
/home/max/go/src/github.com/drmly/drmly/main.go:17 +0x178

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.