TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: A little side project, a watercolor art generator

224 pointsby nfriendover 2 years ago
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&#x27;s _very_ slow (about 50 seconds&#x2F;image), and currently it processes exactly one image at a time. The website is built with NextJS; payments are processed by Stripe.<p>I&#x27;ve had the best results with pictures of houses, although certain photos of people or nature can look neat, too. (For example: <a href="https:&#x2F;&#x2F;brushify.art&#x2F;s&#x2F;ruYmQWk" rel="nofollow">https:&#x2F;&#x2F;brushify.art&#x2F;s&#x2F;ruYmQWk</a>, original photo from <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Pillars_of_Creation" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Pillars_of_Creation</a>.) The effect obscures the edges of the photo, so images with plenty of margin around the subject work best.<p>Something I&#x27;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: <a href="https:&#x2F;&#x2F;www.etsy.com&#x2F;ca&#x2F;search?q=watercolor+house" rel="nofollow">https:&#x2F;&#x2F;www.etsy.com&#x2F;ca&#x2F;search?q=watercolor+house</a>). I have exactly zero AI experience though, so there would be a bit of a learning curve.<p>Would love any thoughts or critiques!<p>----<p>edit: remove unrelated details

34 comments

rikrootsover 2 years ago
Creating a watercolor filter which can be applied to an image dragged into a website &lt;canvas&gt; 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&#x27;d be jumping down a rabbit hole of complex maths and generative art approaches[1][2]. It&#x27;s a complex problem space and I&#x27;m not sure I have the brain power and tenacity to do a good job of it.<p>[1] - Tyler Hobbs (2017) - a guide to simulating watercolor paint with generative art - <a href="https:&#x2F;&#x2F;tylerxhobbs.com&#x2F;essays&#x2F;2017&#x2F;a-generative-approach-to-simulating-watercolor-paints" rel="nofollow">https:&#x2F;&#x2F;tylerxhobbs.com&#x2F;essays&#x2F;2017&#x2F;a-generative-approach-to...</a><p>[2] - Curtis|Anderson|Seims|Fleischery|Salesin (undated) - Computer-Generated Watercolor - <a href="https:&#x2F;&#x2F;grail.cs.washington.edu&#x2F;projects&#x2F;watercolor&#x2F;paper_small.pdf" rel="nofollow">https:&#x2F;&#x2F;grail.cs.washington.edu&#x2F;projects&#x2F;watercolor&#x2F;paper_sm...</a>
评论 #33572209 未加载
kuuover 2 years ago
My recommendation: Add examples on the main page, so the new users don&#x27;t need to overload your site.<p>Otherwise the process is the following:<p>I enter the page -&gt; Upload image -&gt; See 4h of queue for getting my result -&gt; I close the tab, leaving there a pending task.
synapticpaintover 2 years ago
It 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).<p>Here&#x27;s how I would approach it: train a dreambooth model on watercolor style images, then run image-to-image using that model.<p>For examples of what dreambooth models can do see: <a href="https:&#x2F;&#x2F;synapticpaint.com&#x2F;dreambooth&#x2F;info&#x2F;" rel="nofollow">https:&#x2F;&#x2F;synapticpaint.com&#x2F;dreambooth&#x2F;info&#x2F;</a> (sample images here generated using a &quot;modern disney&quot; style model).<p>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.
评论 #33563061 未加载
评论 #33563820 未加载
评论 #33563219 未加载
nfriendover 2 years ago
Sorry 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.
评论 #33562139 未加载
评论 #33563156 未加载
评论 #33564648 未加载
评论 #33563839 未加载
tfshover 2 years ago
The example looks cool, but I&#x27;m currently in an 11 hour queue :(<p>Any chance of porting this to the web using WASM? I&#x27;ve used ImageMagick in the browser before, I&#x27;ve never used Gimp, but if there&#x27;s enough overlap you could use the former. That&#x27;s of course assuming two things:<p>1) you have the time<p>2) you&#x27;re happy to port the closed source, source code to the client<p>Both of which are perfectly fine to answer with a &quot;no&quot; :)<p>Also, I think it would be prudent to terminate the request if the client instance is destroyed. Right now I assume there&#x27;s a bunch of requests being processed for users who have closed the tab.
wingworksover 2 years ago
The results are pretty cool, though it&#x27;s a shame it cropped the edges. <a href="https:&#x2F;&#x2F;brushify.art&#x2F;result&#x2F;aa4e68ae-d9de-4673-830e-f88032ec50ac?couponCode=HACKER-NEWS" rel="nofollow">https:&#x2F;&#x2F;brushify.art&#x2F;result&#x2F;aa4e68ae-d9de-4673-830e-f88032ec...</a>
chrischenover 2 years ago
Our watercolor filter produces pretty good results (the Flower Market filter which also happens to be the example shown): <a href="https:&#x2F;&#x2F;www.instapainting.com&#x2F;assets" rel="nofollow">https:&#x2F;&#x2F;www.instapainting.com&#x2F;assets</a><p>You can implement with something like this and simply train it against a watercolor image: <a href="https:&#x2F;&#x2F;github.com&#x2F;yusuketomoto&#x2F;chainer-fast-neuralstyle" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;yusuketomoto&#x2F;chainer-fast-neuralstyle</a><p>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.
andaiover 2 years ago
Here&#x27;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.
jasonjmcgheeover 2 years ago
Fortunately OP, experience with AI is generally unrelated to success with Stable Diffusion &#x2F; DALLE.<p>What you want to gain is experience with prompt engineering for these tools.<p>Here&#x27;s a good resource <a href="https:&#x2F;&#x2F;openart.ai&#x2F;promptbook" rel="nofollow">https:&#x2F;&#x2F;openart.ai&#x2F;promptbook</a>
bambaxover 2 years ago
&gt; <i>I&#x27;d like to play around with is swapping the GIMP script for an AI-based process</i><p>Dall-e offers an API with some limitations (max 4MB square PNG, content filtering): <a href="https:&#x2F;&#x2F;beta.openai.com&#x2F;docs&#x2F;guides&#x2F;images&#x2F;usage" rel="nofollow">https:&#x2F;&#x2F;beta.openai.com&#x2F;docs&#x2F;guides&#x2F;images&#x2F;usage</a><p>Photopea.com has a watercolor filter, in JS, all client side. It&#x27;s not very good ATM so there&#x27;s certainly room for improvement. Doing it all client side would solve the queue problem.
gregoriolover 2 years ago
If 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&#x27;t know of server-side libraries for that, but on iOS we have MetalPetal which provides some filtering features like ones in Gimp&#x2F;Photoshop.<p>Have fun!
ikkjoover 2 years ago
Would you be willing to share some details on the GIMP implementation? Are you actually generating brush strokes and &quot;paint&quot; 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?
justchadover 2 years ago
Nice, this is really cool! I don&#x27;t see myself waiting for my photo to process as it&#x27;s a ~4 hour wait but the example image is cool.<p>Like you said I bet using Stable Diffusion would speed this up dramatically but who knows if you&#x27;ll get the same effect on your images.
_448over 2 years ago
In addition to upload&#x2F;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.
yuvalkarmiover 2 years ago
This is super cool! Didn&#x27;t know you could run GIMP in headless mode.
seshagiricover 2 years ago
I understand it&#x27;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?
asmosoinioover 2 years ago
Site seems to be down - could you post the example output on some image sharing site?<p>Seeing example output would be interesting, even if service is hugged to death.
hollowdeneover 2 years ago
Can&#x27;t see myself paying $5.99 for one of these, but it&#x27;s nice. I appreciated the fun messages in the progress bar.<p>PS: Congrats on the little one. :D
iruoyover 2 years ago
It&#x27;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&#x27;t be processed.
_danover 2 years ago
Perhaps put the wait time on the homepage - If I&#x27;d known you were running at an 8 hour delay I wouldn&#x27;t have added to it!
pknerdover 2 years ago
The message on the page:<p>It&#x27;s a busy day! There are currently 512 people in front of you. Please keep this tab open!<p>Estimated wait time: 7 hours, 7 minutes
评论 #33563329 未加载
keizoover 2 years ago
Super cool! Cnc painter next and make a business making custom cards for people!
stoobsover 2 years ago
Estimated wait time: 6 hours, 33 minutes<p>Oops, sorry OP for all the traffic :D
the_arunover 2 years ago
There should be a smart phone app for this already, right?
diego_moitaover 2 years ago
I just loved the messages while it is processing!
Kiroover 2 years ago
Why NextJS for this?
Kaotiqueover 2 years ago
Looks really nice!
notyouravover 2 years ago
14h wait time
tristanbvkover 2 years ago
Very vool
hackmiesterover 2 years ago
I&#x27;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.<p>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&#x27;m guessing the answer is, &quot;probably.&quot; No need to engineer a fix for a problem that will typically not exist.
评论 #33564018 未加载
XCSmeover 2 years ago
I hope the result is worth the wait!<p>&gt; There are currently 1069 people in front of you. Please keep this tab open!<p>&gt; Estimated wait time: 14 hours, 51 minutes
评论 #33563644 未加载
评论 #33563958 未加载
评论 #33564024 未加载
moffkalastover 2 years ago
&gt; Estimated wait time: 2 hours, 35 minutes<p>Bruh moment.<p>I suppose it would make more sense to WASM the implementation and run it clientside?
评论 #33561730 未加载
ale42over 2 years ago
Now: Estimated wait time: 9 hours, 49 minutes...<p>The hug is getting tighter ;-)
评论 #33563291 未加载
评论 #33564053 未加载
xchipover 2 years ago
Why do we need to know you did this while on paternity leave?
评论 #33561498 未加载
评论 #33561583 未加载
评论 #33561754 未加载
评论 #33561606 未加载
评论 #33561740 未加载