TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

224 点作者 nfriend超过 2 年前
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 条评论

rikroots超过 2 年前
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 未加载
kuu超过 2 年前
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.
synapticpaint超过 2 年前
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 未加载
nfriend超过 2 年前
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 未加载
tfsh超过 2 年前
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.
wingworks超过 2 年前
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>
chrischen超过 2 年前
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.
andai超过 2 年前
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.
jasonjmcghee超过 2 年前
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>
bambax超过 2 年前
&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.
gregoriol超过 2 年前
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!
ikkjo超过 2 年前
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?
justchad超过 2 年前
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.
_448超过 2 年前
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.
yuvalkarmi超过 2 年前
This is super cool! Didn&#x27;t know you could run GIMP in headless mode.
seshagiric超过 2 年前
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?
asmosoinio超过 2 年前
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.
hollowdene超过 2 年前
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
iruoy超过 2 年前
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.
_dan超过 2 年前
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!
pknerd超过 2 年前
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 未加载
keizo超过 2 年前
Super cool! Cnc painter next and make a business making custom cards for people!
stoobs超过 2 年前
Estimated wait time: 6 hours, 33 minutes<p>Oops, sorry OP for all the traffic :D
the_arun超过 2 年前
There should be a smart phone app for this already, right?
diego_moita超过 2 年前
I just loved the messages while it is processing!
Kiro超过 2 年前
Why NextJS for this?
Kaotique超过 2 年前
Looks really nice!
notyourav超过 2 年前
14h wait time
tristanbvk超过 2 年前
Very vool
hackmiester超过 2 年前
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 未加载
XCSme超过 2 年前
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 未加载
moffkalast超过 2 年前
&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 未加载
ale42超过 2 年前
Now: Estimated wait time: 9 hours, 49 minutes...<p>The hug is getting tighter ;-)
评论 #33563291 未加载
评论 #33564053 未加载
xchip超过 2 年前
Why do we need to know you did this while on paternity leave?
评论 #33561498 未加载
评论 #33561583 未加载
评论 #33561754 未加载
评论 #33561606 未加载
评论 #33561740 未加载