惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
S
Secure Thoughts
C
Check Point Blog
D
DataBreaches.Net
V
V2EX
The GitHub Blog
The GitHub Blog
博客园 - Franky
博客园_首页
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog
Last Week in AI
Last Week in AI
H
Help Net Security
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
宝玉的分享
宝玉的分享
A
About on SuperTechFans
月光博客
月光博客
Google DeepMind News
Google DeepMind News
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
GbyAI
GbyAI
G
Google Developers Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
C
CXSECURITY Database RSS Feed - CXSecurity.com
MyScale Blog
MyScale Blog
T
Threatpost
V
Vulnerabilities – Threatpost
AI
AI
Cyberwarzone
Cyberwarzone
B
Blog RSS Feed
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LINUX DO - 最新话题
L
LangChain Blog
Webroot Blog
Webroot Blog
AWS News Blog
AWS News Blog
云风的 BLOG
云风的 BLOG
W
WeLiveSecurity
Latest news
Latest news
U
Unit 42
C
CERT Recently Published Vulnerability Notes
Cisco Talos Blog
Cisco Talos Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
Security @ Cisco Blogs
Forbes - Security
Forbes - Security

Rc-2020 on Julia Evans

Day 57: Trying to set up GitHub Actions Day 56: A little WebAssembly Day 53: a little nginx, IPv6, and wireguard Day 52: testing how many Firecracker VMs I can run Day 51: Fixed my logging and made a couple of puzzles Day 50: Building some tarballs for puzzles, and trying to make a kernel boot faster Day 49: making the VMs boot faster Day 48: Another Go program, and a little vim configuration Day 47: Using device mapper to manage Firecracker images Day 46: debugging an iptables problem Day 44: Building my VMs with Docker Day 43: Building VM images Day 42: Writing a Go program to manage Firecracker VMs Day 41: Trying to understand what a bridge is Day 40: screen flickering & a talk about containers Day 39: Customizing gotty's terminal Day 38: Modifying gotty to serve many different terminal applications at once Day 37: A new laptop and a little Vue Day 35: Launching my VMs more reliably Day 34: Learning about qemu Day 33: pairing is magic and beautiful git diffs Day 32: A Rails model that doesn't use the database with ActiveHash Day 24: a short talk about blogging myths, and a debugging tip Day 23: a little Rails testing Day 22: getting OAuth to work in Rails Day 21: wrangling systemd & setting up git deploys to a VM Day 19: Clustering faces (poorly) using an autoencoder Day 20: trying to figure out how Google Cloud IAM works Day 18: an answer to an autoencoder question Day 17: trying to wrap my head around autoencoders Day 13: BPTT, and debugging why a model isn't training is hard Day 11: learning about learning rates Day 10: Training an RNN to count to three Day 9: Generating a lot of nonsense with an RNN Day 8: Start with something that works Day 3: an infinitely tall fridge Day 2: Rails associations & dragging divs around Day 1: a confusing Rails error message I'm doing another Recurse Center batch!
Day 5: drawing lots of faces with sketch-rnn
Julia Evans · 2020-11-17 · via Rc-2020 on Julia Evans

Hello! This week it’s generative art week at RC, and I thought it would be fun to generate drawings of faces.

Someone suggested the Google Quickdraw dataset, which has a lot of pictures of faces. And even though I think most of the faces in there are not really that interesting, I really quite like some of them, like these two:

So that seems like somewhere to start!

step 1: get the sketch-rnn model

sketch-rnn is an RNN trained on the quickdraw dataset that generates line drawings. You can see it in action in Monica Dinculescu’s very fun magic sketchpad demo here – you start making a drawing, and it’ll complete you drawing as a cat / bridge / whatever you want.

I figured that would be a fun place to start, and ml5js has a tutorial showing how to write Javascript code to draw things with sketch-rnn, which I followed.

step 2: make the tutorial code use async/await

The ml5js example had a bunch of global variables and callbacks and I found it difficult to work with, so I spent a while refactoring it to use async/await so that I could play around with it more easily. This took a while but I got it to work.

I started out with making a more interactive website, but decided to instead do something really simple to start: just get the model to draw a lot of faces and see how I felt about them.

Here’s the resulting (very janky, not responsive) website I made, which draws faces and then puts them into a little “gallery” on the right: lots of sketch-rnn faces. You can see it “live” drawing the faces which is fun.

The set of images that comes out looks something like this:

I don’t really like any of these faces, but it’s a start! It’s also very slow on my 2015 laptop, but faster on the iPad. I didn’t spend a lot of time profiling it, but it seems to spend a lot of time in some function with lstm in its name – I don’t know what an LSTM is exactly but I know it’s a component of an RNN, so I guess (as you’d expect) it just has a lot of math to do in Javascript to calculate the next line to draw and that’s slow.

next step: maybe find out if sketch-rnn can tell the difference between “interesting” and “boring” faces

I think that this face:

is a lot more interesting than this face:

Can I convince the neural network to distinguish between faces that I think are ‘interesting’ and ‘boring’ and maybe only generate more “interesting” faces? We’ll see! Right now I am stuck on trying to get a pre-trained model loaded into Python, so there’s a long way to go.

I did find someone who’d done something kind of similar, on bad flamingos vs good flamingos in the quickdraw dataset.

I still don’t really know anything about RNNs, but maybe if I can answer this question I will learn something about them.

also there’s a refrigerator poetry forum

Here’s that refrigerator poetry forum I was talking about last week: https://refrigerator-poetry-forum.herokuapp.com/. You can write magnet poetry-style poems on a refrigerator. People wrote some charming poems and I’m happy with it. I think I might use Rails for another project in the future.

Hopefully people won’t abuse it, if there’s abuse I’ll just take it off the internet probably.