7 ms·
Show HN: A little side project, a watercolor art generator
Hi HN - this is a little side project I threw together. Some implementation details: image processing is all done with headless GIMP (running inside a Docker container) through its built-in Python API. It's _very_ slow (about 50 seconds/image), and currently it processes exactly one image at a time. The website is built with NextJS; payments are processed by Stripe.
I've had the best results with pictures of houses, although certain photos of people or nature can look neat, too. (For example: https://brushify.art/s/ruYmQWk https://brushify.art/s/ruYmQWk, original photo from https://en.wikipedia.org/wiki/Pillars_of_Creation https://en.wikipedia.org/wiki/Pillars_of_Creation.) The effect obscures the edges of the photo, so images with plenty of margin around the subject work best.
Something I'd like to play around with is swapping the GIMP script for an AI-based process (maybe using something like Stable Diffusion?), with the goal of generating images that look more handmade (something like these: https://www.etsy.com/ca/search?q=watercolor+house https://www.etsy.com/ca/search?q=watercolor+house). I have exactly zero AI experience though, so there would be a bit of a learning curve.
Would love any thoughts or critiques!
----
edit: remove unrelated details
- xchip 4y agoWhy do we need to know you did this while on paternity leave?
- deleted 4y ago[deleted]
- KraxKrokat 4y agoWhy do we need to know that this was made at all? Let the guy share a bit of context about his little side project (cool work btw!). Why are you so snarky today?
- yuvalkarmi 4y agoI feel the same way. I like the context and it adds a bit of story around this.
- quest88 4y agoWhat's the point of your comment? Why do you care? Why do we need to know about this project at all? Why is anything posted to hackernews at all? Why? Please discuss the project if it's interesting to you, otherwise move on. There is a human who posted the project. Maybe they were nervous to post because of the feedback they get. Maybe they wish it ran faster (as they noted on its slowness), and provided some context by stating they couldn't devote 100% focus to this project because they were caring for a new born baby.
- nfriend 4y agoThought it was some fun context, but I can see why it might come off as a strange detail to include. Edited to remove the distraction.
- pvg 4y agoBe kind. Don't be snarky. Have curious conversation; don't cross-examine. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- effnorwood 4y ago
- d1l 4y ago
- yuvalkarmi 4y agoDude what's with the toxicity? Who says he's not helping? Also, babies sleep sometimes... Lay it off with the snarky / toxic comments - totally off topic to the submission.
- Kaotique 4y agoLooks really nice!
- yuvalkarmi 4y agoThis is super cool! Didn't know you could run GIMP in headless mode.
- tristanbvk 4y agoVery vool
- hollowdene 4y agoCan't see myself paying $5.99 for one of these, but it's nice. I appreciated the fun messages in the progress bar. PS: Congrats on the little one. :D
- iruoy 4y agoIt's not exactly a hug of death, but a wait time of 90m is a bit long. I hope that people that leave the queue won't be processed.
- moffkalast 4y ago> Estimated wait time: 2 hours, 35 minutes Bruh moment. I suppose it would make more sense to WASM the implementation and run it clientside?
- deleted 4y ago[deleted]
- nfriend 4y agoSorry all for the long wait times! Was not expecting much interest. At the very least, I need to look into removing photos from the queue when people exit the page.
- selcuka 4y agoI wouldn't even let people add new images to the queue if the wait period is over, say, 10 minutes.
- nfriend 4y agoNot a bad idea!
- wishinghand 4y agoHow is the image processing being done? In broad strokes, what're you doing with the Python API?
- jansan 4y agoIt says I should keep that tab open for the next 17 hours. What happens if I still close it? Congrats for the unexpected success :)
- nfriend 4y agoUnfortunately nothing at the moment! Currently working on removing images from the queue if the user has left the page (which I'm guessing is the case for about 99% of the current queue).
- justchad 4y agoNice, this is really cool! I don't see myself waiting for my photo to process as it's a ~4 hour wait but the example image is cool. Like you said I bet using Stable Diffusion would speed this up dramatically but who knows if you'll get the same effect on your images.
- _448 4y agoIn addition to upload/drop image, you could also provide an option to enter an URL of online image. That will make it easy for users to try the project very quickly. Then provide an ephemeral preview URL to see the output.
- kuu 4y agoMy recommendation: Add examples on the main page, so the new users don't need to overload your site. Otherwise the process is the following: I enter the page -> Upload image -> See 4h of queue for getting my result -> I close the tab, leaving there a pending task.
- gregoriol 4y agoIf you can make it with GIMP, you could probably look into OpenGL shaders to do it directly yourself: the processing could be faster and would provide you with more flexibility and coding fun times. I don't know of server-side libraries for that, but on iOS we have MetalPetal which provides some filtering features like ones in Gimp/Photoshop. Have fun!
- stoobs 4y agoEstimated wait time: 6 hours, 33 minutes Oops, sorry OP for all the traffic :D
- pknerd 4y agoThe message on the page: It's a busy day! There are currently 512 people in front of you. Please keep this tab open! Estimated wait time: 7 hours, 7 minutes
- thih9 4y ago1h later it’s: > It's a busy day! There are currently 1073 people in front of you. Please keep this tab open! > Estimated wait time: 14 hours, 54 minutes
- ale42 4y agoNow: Estimated wait time: 9 hours, 49 minutes... The hug is getting tighter ;-)
- rikroots 4y ago"It's a busy day! There are currently 1048 people in front of you. Please keep this tab open! Estimated wait time: 14 hours, 33 minutes"
- deleted 4y ago[deleted]
- _dan 4y agoPerhaps put the wait time on the homepage - If I'd known you were running at an 8 hour delay I wouldn't have added to it!
- bambax 4y ago> I'd like to play around with is swapping the GIMP script for an AI-based process Dall-e offers an API with some limitations (max 4MB square PNG, content filtering): https://beta.openai.com/docs/guides/images/usage https://beta.openai.com/docs/guides/images/usage Photopea.com has a watercolor filter, in JS, all client side. It's not very good ATM so there's certainly room for improvement. Doing it all client side would solve the queue problem.
- jasonjmcghee 4y agoFortunately OP, experience with AI is generally unrelated to success with Stable Diffusion / DALLE. What you want to gain is experience with prompt engineering for these tools. Here's a good resource https://openart.ai/promptbook https://openart.ai/promptbook
- tfsh 4y agoThe example looks cool, but I'm currently in an 11 hour queue :( Any chance of porting this to the web using WASM? I've used ImageMagick in the browser before, I've never used Gimp, but if there's enough overlap you could use the former. That's of course assuming two things: 1) you have the time 2) you're happy to port the closed source, source code to the client Both of which are perfectly fine to answer with a "no" :) Also, I think it would be prudent to terminate the request if the client instance is destroyed. Right now I assume there's a bunch of requests being processed for users who have closed the tab.
- synapticpaint 4y agoIt sounds like your app turns photos into a watercolor style image? You can definitely do this faster with Stable Diffusion (~6s per image before optimization). Here's how I would approach it: train a dreambooth model on watercolor style images, then run image-to-image using that model. For examples of what dreambooth models can do see: https://synapticpaint.com/dreambooth/info/ https://synapticpaint.com/dreambooth/info/ (sample images here generated using a "modern disney" style model). If you need help getting this set up feel free to email me! This stuff is probably not harder than getting gimp to run in a container.
- wongarsu 4y agoStable Diffusion on beefy hardware is faster than OPs process in OPs docker container, but I don't think we can judge from this that OP uses a slower process. For all we know this is running on the equivalent of a $10 Digital Ocean droplet.
- nfriend 4y agoCurrently running on a t3.medium AWS EC2 instance! (My max budget is currently $50/month since I get that much in AWS credits each month for building an Alexa skill a few years back.)
- synapticpaint 4y agoThat's true. I just wanted to provide some context for OP and others reading since they mentioned an interest in AI generation, and I think not everyone knows that dreambooth + stable diffusion has this kind of capability.
- rlv-dan 4y agoThis comment make me sad. Replacing human creativity with "ai" is like we've reached the peak so no need to put any effort into life anymore..
- adammarples 4y agorunning a GIMP script is hardly the opposite
- hackmiester 4y agoI'm going to go against the grain here. If this were my project I would try to spin up render machines dynamically in response to load. (Similarly to how gitlab CI runners can be spun up automatically, for instance.) There is no need to replace a working technology stack to make it faster. 1 minute is a reasonable wait time, and if your wait time goes over 5 minutes, then spin up some more workers. Plus we have to be real and say, is the only reason the queue so long, because you let a bunch of nerds on HN add to the queue for free? I'm guessing the answer is, "probably." No need to engineer a fix for a problem that will typically not exist.
- deleted 4y ago[deleted]
- serge1978 4y ago
- notyourav 4y ago14h wait time
- XCSme 4y agoI hope the result is worth the wait! > There are currently 1069 people in front of you. Please keep this tab open! > Estimated wait time: 14 hours, 51 minutes
- deleted 4y ago[deleted]
- rikroots 4y agoCreating a watercolor filter which can be applied to an image dragged into a website <canvas> element is on my list of Fun Things To Do Over The Holidays - but having previously looked at the the mechanics that need to feed into the filter ... well it looks like I'd be jumping down a rabbit hole of complex maths and generative art approaches[1][2]. It's a complex problem space and I'm not sure I have the brain power and tenacity to do a good job of it. [1] - Tyler Hobbs (2017) - a guide to simulating watercolor paint with generative art - https://tylerxhobbs.com/essays/2017/a-generative-approach-to-simulating-watercolor-paints https://tylerxhobbs.com/essays/2017/a-generative-approach-to... [2] - Curtis|Anderson|Seims|Fleischery|Salesin (undated) - Computer-Generated Watercolor - https://grail.cs.washington.edu/projects/watercolor/paper_small.pdf https://grail.cs.washington.edu/projects/watercolor/paper_sm...
- ikkjo 4y agoI guess you are right, the rabbit hole is quite deep. I spent a long time in it to make my own side-project: https://rembrob.com/ https://rembrob.com/ It is loosely based on the process described here: https://yunfei.work/watercolor/watercolor_pp.pdf https://yunfei.work/watercolor/watercolor_pp.pdf and I though this can't be too hard... I found it challenging to combine high resolution results with reasonable processing times.
- Kiro 4y agoWhy NextJS for this?
- andai 4y agoHere's a suggestion, port it to run in the browser. Free parallelism, because every user brings their own hardware :) So it scales infinitely, for free.
- asmosoinio 4y agoSite seems to be down - could you post the example output on some image sharing site? Seeing example output would be interesting, even if service is hugged to death.
- the_arun 4y agoThere should be a smart phone app for this already, right?
- mlvljr 4y ago
- diego_moita 4y agoI just loved the messages while it is processing!
- wingworks 4y agoThe results are pretty cool, though it's a shame it cropped the edges. https://brushify.art/result/aa4e68ae-d9de-4673-830e-f88032ec50ac?couponCode=HACKER-NEWS https://brushify.art/result/aa4e68ae-d9de-4673-830e-f88032ec...
- chrischen 4y agoOur watercolor filter produces pretty good results (the Flower Market filter which also happens to be the example shown): https://www.instapainting.com/assets https://www.instapainting.com/assets You can implement with something like this and simply train it against a watercolor image: https://github.com/yusuketomoto/chainer-fast-neuralstyle https://github.com/yusuketomoto/chainer-fast-neuralstyle Haven’t tried it with stable diffusion but you’d probably have more control and better results with a CNN like the one I linked.
- seshagiric 4y agoI understand it's a side project but you do have a paid offering. So I am curious what are you doing with the images after they are processed?
- keizo 4y agoSuper cool! Cnc painter next and make a business making custom cards for people!
- ikkjo 4y agoWould you be willing to share some details on the GIMP implementation? Are you actually generating brush strokes and "paint" the image or is it more filter based? The background effect looks like brush strokes to me, but are the details done in the same way?