Show HN: Draw a fish and watch it swim with the others

6 months ago (drawafish.com)

Made this website as an exercise in vibe-coding and GCP. It was posted about a few times around the internet, on sites like [Morning Brew](https://www.morningbrew.com/issues/business-buzzkill), [MetaFilter](https://www.metafilter.com/209703/Draw-A-Fish), boingboing.net, etc. I think it's cute!

I built a basic CNN trained against penises and swastikas, and then anything that doesn't hit the 63% confidence score gets sent to a mod queue, a [vibe-coded fish-tinder](https://bsky.app/profile/bigass.bsky.social/post/3luvikxn3f2...).

Was a fun exercise, spent about a month on it. Frontend is HTML5 hosted on github pages, backend is Node.JS on GCP.

The leaderboard is fascinating. Some people are clearly putting a lot of time into this, while the rest of us are trying to sneak phallic shapes past your CNN.

1. https://drawafish.com/rank.html?userId=1753510318634_cdeh6a4...

  • I am literally trying my best to draw a fish only to be told it is only 30% likely to be a fish. Cruel.

  • I could dedicate a month, or a year, and never come up with something like those. Are they really using the site tool, or is there a trick to draw them elsewhere and import them? Those are truly amazing!

  • I was extremely happy with my 60% Wang fish. And now after looking at the leaderboard I feel bad.

    • I drew a real triumphant one that edged over the 60% threshold. Then read that the mod queue was at 63% and had to do it all over again.

  • Ok there's some sort of bot war going on with the leaderboard, right? The Palestine fish has 370,000 votes total (both up & down), which seems like a lot. Does HN really drive that kind of traffic??

  • Are people actually drawing these in the browser, or is there some extension that lets you populate a canvas with something you did with a stylus in Photoshop?

    •     const input = document.createElement("input");
          document.body.append(input);
          input.type = "file";
          input.accept = "image/*";
          input.onchange = e => {
              if (input.files && input.files[0]) {
                  const canvas = document.getElementById("draw-canvas");
                  const ctx = canvas.getContext("2d");
                  createImageBitmap(input.files[0]).then(img => ctx.drawImage(img, 0, 0));
              }
          };

    • I’m browsing hn on my iphone, clicked this link, drew a fish with my finger, and saw it

      Worked out the box didn't think twice of it

      Good point though as the site doesnt follow responsive design patterns

  • Looking at those I feel my fish was totally inadequate. The first one didn't even pass the autofilter since it had a stick figure face ...

    Really nice toy!

  • The major problem is that I could up-vote and down-vote as many times as I want. It is rate-limited, however[1]. I know, because I wrote a script. :D Seems like someone else did, too, except to down-vote.

    Please fix it.

    Edit: these down-votes are going down by the 100s or so, someone is really bullish to have "RiverToSea" fish down-voted. Ironically, the "RiverToSea" fish was made by someone who named himself "f**k palestine".

    [1] After refresh, you can continue voting till you reach the limit, which is problematic.

The website is great!

> I built a basic CNN trained against penises

After seeing it in action, my second thought (first was just watching my fish) was that I was amazed at the good behavior of the users because I would have expected a lot of penises floating around. Now I understand. Nicely done!

https://imgur.com/a/Vtoxc7p

35% for this masterpiece? Rigged

  • My guess is the CNN was trained on highly abstracted stereotypical-fish-drawings, not on actual pictures or high-quality drawings of fish. I put in my best effort to draw a good-looking fish (although I'm no artist) and I got 35%. Then I drew a basic single-stroke fish and got 65%.

  • this piece de resistance swan song is only 35% fish but then my fish tank is like 90% various formats of blackface fish, nazi fish, and swimming penises

Somewhat interesting thing with my 9yo. She's a pretty good artist, she can draw various characters and objects pretty well.

With this she clearly just wanted to do the standard stick fish shape, but it turns out she only knows how to do it facing left. Facing left, looks typical, facing right, almost a figure 8. So after like 6 attempts being judged by the computer she's getting frustrated, and I'm like how about this, turn the phone upside down to have her draw facing left. But now she can't do it left either!

  • Feature request: Make the model evaluate the fish and then evaluate the mirrored version of the fish. Pick the highest value as the orientation. What could go wrong? Perhaps ask the user before mirroring?

  • You're right, that IS interesting. Something about having to learn with rigid constraints first before you can generalize the knowledge, I guess.

    • I think she learned to do the fish the way kids learn to draw a star. It's a motion they learn to do, and she wanted to do that simple motion. She's good at knowing a shape she wants to make and drawing it but I think knowing a gesture she wants to make is different.

      And then I think when she consciously thinks about it - trying to do it the opposite way, or later the normal way after being judged repeatedly - she can't make the motion that way. But I bet if she was just thinking of the shape and trying to draw that shape it would be zero issue.

Suggestion: canvas.addEventListener('dragstart', (e) => { e.preventDefault(); } );

At least on Firefox/Mac, sometimes while dragging it "picks up" the image to drag it. This should prevent that.

> exercise in vibe-coding

The code shows it... Your escaping routine seems OK, but you really __should not__ be building HTML and JS(!) using raw string interpolation. Or letting the client decide whether the submission needs moderation.

  • I don't let the client decide whether the submission needs moderation :)

    There's a very slightly different model in the backend that sends things to the mod queue. Strings are also sanitized there. But copilot really wanted to add all that logic to the frontend too and I thought it was funny

  • To be fair, everything on the client is raw string interpolation. It's only secure if you comprehensively vet everything once it's on the server.

    • That's absolutely not true. Sanitization on the client is significantly safer, because the client knows how it parses HTML, while the server can, at best, guess (and hope it follows the spec).

      When you set element.textContent = someUserGeneratedContent, the browser guarantees that the user-generated content will never be parsed as HTML.

      response.write("<div>" + sanitize(someUserGeneratedContent) + "</div>") has no such guarantee.

      2 replies →

I did this on a trip to Japan but can't remember for the life of me where. Some museum. My wife and I drew fishes and then they were uploaded and we went to a room and watched them swim across walls/ceilings. Really cool experience

> I built a basic CNN trained against penises and swastikas

Isn't this how some Lego MMO died? They spent too many resources on "moderation" and too few on the actual game.

If you post that more proeminently, maybe you'll get a bunch of kids on summer holidays finding ways to make penises pass your filter...

I tried my damnedest to give my fish a ballsack. That's a real good fishiness detector.

What a fun game! Especially on a Note 10+, and I have to say, seeing the dongnet keep up with each pen stroke on a 2019 device is really impressive! Possibly still a little generous, though, I think. Writing "FISH" on a rectangle shouldn't hit 50%, but this does explain why SSN-69 didn't have much of a chance :D

This is the most wholesome thing I saw on the internet for a long time. Thanks for the effort!

That is fun. And it's nice to know that everyone else on HN is about as artistic as I am.

  • I love when there are traffic spikes and I get to discover which corners of the internet have artistic talent or lack thereof :)

Fun!!!

Small changes if make: - Change the background colour of the drawing canvas to match the water background - Add fill tool? So folks can color this fish white? Bonus points if you automatically color the inside part of the fish white - Fix the discontinuity of how the fish swim by stretching the pixels of the fish that you draw

I drew a fish but I couldn't find it anywhere when it switched to the tank. Perhaps you could highlight the user's own fish, at least initially?

EDIT: Tried again and now I see there is a highlight, but it's pretty hard to see a in a busy tank, the color contrast is not very high

I keep getting this error on both Safari and Firefox:

Uncaught (in promise) Error: Fish model not loaded verifyFishDoodle https://drawafish.com/src/js/app.js:514 <anonymous> https://drawafish.com/src/js/app.js:170 EventListener.handleEvent* https://drawafish.com/src/js/app.js:168

Edit: Never mind, I had to wait till the model loaded. Took some time though. Fun project nevertheless!

  • This is an issue that many are seeing, it has to do with how the model is loaded / how the submission logic works without it. I think I know the fix, but am currently getting slammed at my big boy job and so I can't fix it until I'm free in the evening ...

Fun, but really frustrating to spend a ton of time making a detailed fish, get a fish probability of 67.2%, submit it successfully with no note about it needing moderation, and it still never shows up.

And I don't mean "I never noticed it show up in the public tank". I mean my profile says "8 fish created", but if I "view my fish" there are only two in the list. If I go to my default fish tank I see all 8, but if I click on one of the missing ones and try to add it to a different tank or vote on it I get "Failed to <do whatever>: Fish not found".

They exist but they don't exist. This isn't a tank, it's a window into purgatory.

This doesn’t work for me on Firefox Focus on iOS, even with all the ad and tracker blocking disabled. Tapping on the make it swim button does nothing. I’m able to see the tank with the tank button though.

OP has a clear bias against angelfish.

  • Drawing a catfish was pretty rough. Sometimes the little fins would make it be more fish-like, other times, they would make it less so.

    I did manage to finally get one in there, but it looked more like a plane than a fish.

There used to be something like this at the Boston Museum of Science, where you created a fish (don’t remember if you drew it freehand and/or selected from different fish parts) and released it into the tank with other fish and predators.

Nice, I got my upside down penis fish past the filter! Although, once it was swimming it did look very much like a fancy guppy. I don't think anyone would recognize it, but I still feel smug about "beating" the machine.

Does not work for me on desktop Firefox. When I press the "make it swim!" button, there's an error in console: "Uncaught (in promise) Error: Fish model not loaded"

  • I could submit a fish on desktop Firefox, but apparently the fish died shortly thereafter. Voting is broken though.

    EDIT: Nevermind! Now there's a problem uploading a fish, and the local aquarium is broken, so I can't view the previous one, either. It's a nice idea, but I really wish it worked better with Firefox (being on the web and all).

My initial fish likelihood score was 7% and I couldn't get it past 12% without looking up what a fish looks like. I learned a lot about myself via this app, so thank you.

What a fun, whimsical idea. I love this.

Also: When you release something like this to the public, I'm amazed at how quickly humans race to the bottom. That bit can be awful to watch.

> Frontend is HTML5 hosted on github pages, backend is Node.JS on GCP.

So this means it's doing CORS? Why not just have GCP serve everything?

Kudos to the person who managed to sneak a tiny fish, in a fish tank, on a table, with a plant in a plant pot, past the detector.

Cool but ......

This is my feeling of vibe coding this kind of stuff so far. It's never really good, it's just kind of acceptable because it was vibe codeded.

The way the fish are stretched where they gets sliced into bands is not something I think most humans would generally choose to do. With a few characters of code change you could at least stretch each column so it scales to the next column.

I know vibe coding will continue to get better. There's a bunch of people at my work that have a vibe-coding chat where they show off their latest creation. Most of them they'd done in Gemini Canvas. The prompts are usually 1 or 2 paragraphs like "Make a 3d tower defense game with joypad input where you move a character using the joypad and can place towers by pressing the button. ....." And it spits out a working game but it's only interesting because it was vibe coded, not because the game is actually in any-way-shape-or-form interesting, good, pretty.

Also, I appreciate that this game had a fish recognizer but I also found it super scary. I tried to make to make a sunfish and it was like "not a fish". I don't want bad AI judging what is and isn't acceptable.

This is so cool!

I did just about spit out of coffee reading the words vibe coded fish tinder though. But a smart thing to implement.

Locally we have the National Museum of Play. One of the exhibits right near the entrance is a virtual aquarium where you can color in a picture of a fish. Then you take it to a scanner and press a button and your fish starts swimming in a huge screen that serves as a virtual aquarium.

This is my favorite thing today! I only saw one penis fish (with the penis nestled inside the face, as a facial feature of sorts). That's pretty good for a drawing app on the internet, well done! I've given up on running public apps that accept user contributions.

Would love to hear more info on how you actually vibe coded this as the fishbowl seems incredibly cool

I recently went to an aquarium in Exmouth, Western Australia, which had a giant wall mounted display with a tablet which allowed kids (of all ages!) to draw a fish and "release" it into the tank.

I realized that my drawn with a mouse fish looks a lot like the fish quilt block I made. Neither were very good. But I enjoyed making them both :-)

Now to share with my grandkids.

I love that the common styles of fish are a function of what tools people were given.

For example, if a fill tool was available I bet we would see far far fewer hollow fish.

  • I love how it immediately became a meta game of how large of a phallus you can get on your fish while still maintaining an acceptable fish-like score.

    edit - my beautiful Esox Pinilis was culled from the UGC ocean by whoever is manually moderating this :D

Very fun. My only suggestion would be a small highlight when you submit your fish so you can easily see which fish is yours - at least for a few seconds.

Very cool! NN seems too focused on precision over recall (not allowing enough false positives) but trying to get stuff past it is also part of the fun.

There’s a museum in Tokyo that has this but for physically drawn fish and is then projected on a large wall. Cool to see a digital version

  • This was my first thought. It’s called Sketch Ocean and it’s in a teamLab experience!

I love these kind of websites. After finishing my drawing, I spent way more time than I expected looking through other people drawings.

Fun to try to draw a fish that passes the looks like a fish test, while having as many penis-like features as possible.

Well the first thing I did was submit a good ole CNB (use your imagination) and it put it under review.... so nice job hah!

i love frivolous stuff like this. it's art that reminds me of the internet's early days, well done.

This is what the internet should be all about.

Now, make a man and we will make him adventure in the forest?

Tell me why my fish just died!? Just went through a little loss and now feel sad

  • It only shows the most recent 50 fish. Your fish got bumped by a newer fish.

It looks like this has been hijacked by some edgy online communities.

Is there some sort of overlap between HN and cesspits like 4chan? Or did this get posted elsewhere?

  • Unfortunately got posted to some heinous websites... and I made the mistake of using a very simple username and password that's been leaked 100 times for my admin account. I was going to "change it later"...

    Anyway, working on the rollback now. A nice guy from here reached out and reported some small vulns I involuntarily committed.

I waited for my fish. But it never came. Made me sad.

  • It turns out there are two filters; the fishiness as determined by the UI layer must be separate from the content moderation filters on the backend. I've also had a couple fish that the UI thought were acceptable but the backend (rightfully) disappeared into the void.

Now I want to see the adult version of this project: same thing with no CNN.

Inundate me with penises and swastikas!

[flagged]