smarter & cuter bots
TRANSCRIPT
Smarter & Cuter Bots
About Me!Rachel White
@ohhoeTechnical Evangelist @ Microsoft
I love catsI love cute thingsI love twitter bots!
Smarter & Cuter Bots -@ohhoe
About Me!RoboKitty – Automated Cat Feeder
https://github.com/rachelnicole/robokitty
Smarter & Cuter Bots -@ohhoe
About Me!Glitch Art!
Smarter & Cuter Bots -@ohhoe
About Me!Artist Residency @ Pioneer Works
Smarter & Cuter Bots -@ohhoe
About Me!Video Games
Smarter & Cuter Bots -@ohhoe
About Me!Cute Twitter Bots
Smarter & Cuter Bots -@ohhoe
Notable Bot Types
Machine LearningMarkov Chain
Corpus FedGenerative Image Bots
Just Plain ~ Weird ~
Smarter & Cuter Bots -@ohhoe
Machine LearningWhat is it?
Smarter & Cuter Bots -@ohhoe
“Machine learning is the subfield of computer science that gives computers the ability to learn without being explicitly programmed .”
Arthur Samuel, 1959
Machine LearningWhat is it?
Smarter & Cuter Bots -@ohhoe
Machine Learning
Smarter & Cuter Bots -@ohhoe
Within the field of data analytics, machine learning is a method used to devise complex models and algorithms that lend themselves to prediction; in commercial use, this is known as predictive analytics.
Source: https://en.wikipedia.org/wiki/Machine_learning
Machine Learning
Smarter & Cuter Bots -@ohhoe
These analytical models allow researchers, data scientists, engineers, and analysts to "produce reliable, repeatable decisions and results" and uncover "hidden insights" through learning from historical relationships and trends in the data.
Source: https://en.wikipedia.org/wiki/Machine_learning
Source: http://freakonometrics.hypotheses.org/20274
Machine Learning
Smarter & Cuter Bots -@ohhoe
Computer Vision, Predictive Text, Emotional Analysis, Facial Detection, Deep Learning, Neural Networks, etc etc etc etc and so on
Machine Learning
Smarter & Cuter Bots -@ohhoe
There’s a lot.But they’re still trained models, they still require some sort of input from a human being.
Natural Language Processing
Smarter & Cuter Bots -@ohhoe
Modern NLP algorithms are based on machine learning, especially statistical machine learning. The paradigm of machine learning is different from that of most prior attempts at language processing. Prior implementations of language-processing tasks typically involved the direct hand coding of large sets of rules.
Source: https://en.wikipedia.org/wiki/Natural_language_processing#Using_machine_learning
Natural Language Processing
Smarter & Cuter Bots -@ohhoe
The machine-learning paradigm calls instead for using general learning algorithms — often, although not always, grounded in statistical inference — to automatically learn such rules through the analysis of large corpora of typical real-world examples. A corpus (plural, "corpora") is a set of documents (or sometimes, individual sentences) that have been hand-annotated with the correct values to be learned.
Source: https://en.wikipedia.org/wiki/Natural_language_processing#Using_machine_learning
Natural Language Processing
Smarter & Cuter Bots -@ohhoe
Types of NLP:Linguistic AnalysisLanguage UnderstandingText AnalyticsAnalyzing Tone
Markov ChainWhat is it?
Smarter & Cuter Bots -@ohhoe
“a stochastic model describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event.”
Markov ChainOh.
Smarter & Cuter Bots -@ohhoe
Source: http://setosa.io/ev/markov-chains/
With two states (A and B) in our state space, there are 4 possible transitions (not 2, because a state can transition back into itself). If we're at 'A' we could transition to 'B' or stay at 'A'. If we're at 'B' we could transition to 'A' or stay at 'B'.
Markov Chain
Smarter & Cuter Bots -@ohhoe
Source: http://setosa.io/ev/markov-chains/
Corpus FedWhat is it?
Smarter & Cuter Bots -@ohhoe
“In linguistics, a corpus (plural corpora) or text corpus is a large and structured set of texts (nowadays usually electronically stored and processed). They are used to do statistical analysis and hypothesis testing, checking occurrences or validating linguistic rules within a specific language territory.”
Source: https://en.wikipedia.org/wiki/Text_corpus
Corpus FedWhat is it?
Smarter & Cuter Bots -@ohhoe
Often used in Natural Language Processing, but more often used with generic twitter bots that combine or utilize text snippets in a more generalized way.
Corpus Fed
Smarter & Cuter Bots -@ohhoe
Source: https://github.com/dariusk/corpora
Corpus Fed
Smarter & Cuter Bots -@ohhoe
Source: https://github.com/rachelnicole/isReallyCute-bot
Generative ImagesWhat is it?
Smarter & Cuter Bots -@ohhoe
SVG generative through traceryCompiled through Image Magick / Graphics MagickAltering raw image binaries
Generative Images
Smarter & Cuter Bots -@ohhoe
Source: @amandaglosson made @tinyneighbor
Generative Images
Smarter & Cuter Bots -@ohhoe
Source: @v21 made @softlandscapes
Smarter & Cuter Bots -@ohhoe
Source: http://cheapbotsdonequick.com/source/softlandscapes
WeirdWhat is it?
Smarter & Cuter Bots -@ohhoe
Idk. Just weird stuff
Seriously though, a lot of corpus fed text, random images, and general nonsensical markov chains for the purpose of being weird and fun.
Smarter & Cuter Bots -@ohhoe
Source: @deathmtn made @cleromancer
Weird
Smarter & Cuter Bots -@ohhoe
Source: @ckolderup made @OminousZoom
So What Are We Making?
Smarter & Cuter Bots -@ohhoe
Twitter Bot! ( obviously )Utilizing Twitter Streaming APIsGraphicsMagickMicrosoft’s Cognitive Services – specifically the Face API
Twit
Smarter & Cuter Bots -@ohhoe
Make sure you have node & npm installedhttps://github.com/ttezel/twitSign up for twitter app for auth tokens
Graphics Magick
Smarter & Cuter Bots -@ohhoe
GraphicsMagick is a tool to create, edit, and compose / composite images. It’s super versatile, you can access it from the cli or C, C++, Lua, Perl, PHP, Python, Tcl, Ruby, Windows .NET, or Windows COM programming interfaces.There’s a node port of it you can use via npm install gm.ButIt’s kind of a pain in the ass
Source: http://www.graphicsmagick.org/
Graphics Magick
Smarter & Cuter Bots -@ohhoe
Down / Up Sampling of images are kind of poor qualityIt requires some hacky workaroundsIn node, you’ve got to use a ton of callbacks to do multiple compositing.To host it on a server you have to be able to install some binaries L
Source: http://www.graphicsmagick.org/
Microsoft Cognitive Services
Smarter & Cuter Bots -@ohhoe
It’s rad.Whole suite of Machine Learning REST APIsComputer Vision, Content Moderator, Emotion, Face, Video, Bing Speech, Custom Recognition, Speaker Recognition, Bing Spell Check, Language Understanding, Linguistic Analysis, Text Analytics, Translator, WebLM, Academic, Entity Linking, Knowledge Exploration, Recommendations, Lots of Bing things.
Source: https://www.microsoft.com/cognitive-services/
Microsoft Cognitive Services
Smarter & Cuter Bots -@ohhoe
It’s super easy to useIf you know how to hit an endpoint, you can use everything.We’re going to use the Face API
Source: https://www.microsoft.com/cognitive-services/
Microsoft Face API
Smarter & Cuter Bots -@ohhoe
Detect one or more human faces in an image and get back face rectangles for where in the image the faces are, along with face attributes which contain machine learning-based predictions of facial features.The face attribute features available are: Age, Gender, Pose, Smile, and Facial Hair along with 27 landmarks for each face in the image.
Source: https://www.microsoft.com/cognitive-services/en-us/face-api
Microsoft Face API
Smarter & Cuter Bots -@ohhoe
Let’s try it out.
Source: https://www.microsoft.com/cognitive-services/en-us/face-api
Okay, but Rachel….
Smarter & Cuter Bots -@ohhoe
What exactly are we making?
Magical and Cute Image Bot!!!
Smarter & Cuter Bots -@ohhoe
Smarter & Cuter Bots -@ohhoe
~ Code Demo Time ~
Smarter & Cuter Bots -@ohhoe
Magical and Cute Image Bot
Smarter & Cuter Bots -@ohhoe
I Launched it in November!
Smarter & Cuter Bots -@ohhoe
People immediately tried to break it!
Sometimes it glitched out
I’m Launching it Right NOW!!!!!!!!
Smarter & Cuter Bots -@ohhoe
Thank You!
Smarter & Cuter Bots -@ohhoe
Follow me on twitter: @ohhoehttp://rachelisaweso.mehttp://imcool.onlineGithub Source: https://github.com/rachelnicole/magicalncutehttp://aka.ms/smarterandcuter