Fixing the image problem of the web using machine learning
Chris Heilmann @codepo8, GotoCon Copenhagen, October 2016Fixing the image problem of the web using machine learning Chris - - PowerPoint PPT Presentation
Fixing the image problem of the web using machine learning Chris - - PowerPoint PPT Presentation
Fixing the image problem of the web using machine learning Chris Heilmann @codepo8, GotoCon Copenhagen, October 2016 Of innovation and impatience CHRIS HEILMANN @CODEPO8 Chris Heilmann @codepo8, Future Decoded, London, Nov 2015 We all know
Of innovation and impatience
Chris Heilmann @codepo8, Future Decoded, London, Nov 2015
CHRIS HEILMANN @CODEPO8
We all know this character, right?
https://en.wikipedia.org/wiki/Mario#Concept_and_creationBut do you know why it looks like it does?
https://en.wikipedia.org/wiki/Mario#Concept_and_creationRed and Blue offered the best contrast to the skin, boots and the game background.
https://en.wikipedia.org/wiki/Mario#Concept_and_creationThe cap meant there was no need to worry about hair style, eyebrows and forehead.
(There were also not enough pixels for waving hair when falling down a hole)
The large nose and moustache made it possible to avoid a mouth and facial expressions.
Design by limitations.
Everything has its reasons and meaning.
⚙
🖦→💼→📲
Evolution is happening around us… …and user numbers are shifting.
T echnology advanced
📲
Pixels are a side-product
- f our interactions on
the web.
📹 📺
So much, that they become a nuisance…
Type Size (kB) Images 1426 Scripts 357 Video 174 Fonts 123 Stylesheets 76 HTML 67 Other 4 Total 2232 kB http://www.httparchive.org/interesting.php#bytesperpageInspirational obesity
🖍 🐙
- Wrong file formats
- Delivering scaled hi-res
images to everybody
- No automatic conversion and
- ptimisation steps
- Hero image instead of text
content
1.4 MB images…
We need to change that to make the web fast again…
🚁
The web is much bigger than our little developer world and growth happens
- utside of it.
Surgical solutions: Proxy Browsers and Cloud Services
Here are a few things you can do.
- Huge images for everybody
- Unoptimised images
- No alternative content
- No training or incentive to
add content in CMS
The problems:
- Better browsers with responsive
image support
- Automated, loss-less image
- ptimisation tools
- File level access to images to
extract metadata
- Scripting solutions to offer
alternative content
- Cloud services with machine
learning APIs for intelligent resizing
- Machine learning for tagging
Our arsenal:
Browsers with responsive image support…
Media queries are greedy!
🖽
<picture> element and srcset
Support is great!
More info…
Live demo…
Automated tools for lossless image optimisation
ImageOptim
File-level access to embedded information in images
EXIF - hidden gems
EXIF - hidden gems
EXIF - THE HIDDEN GEMS
http://code.flickr.net/2012/06/01/parsing- exif-client-side-using-javascript-2/Removing EXIF data…
Remove locations…
How about providing fallback content?
Blur-up technique
https://css-tricks.com/the-blur-up-technique- for-loading-background-images/Counting pixels…
Counting pixels…
Colorify.js
http://colorify.rockshttps://github.com/jwagner/smartcrop.js/
http://lokeshdhakar.com/projects/color-thief/Color thief…
SCRIPTING SOLUTIONS FOR ALTERNATIVE CONTENT
Intelligent image resizing
Smartcrop.js
Intelligent resizing
http://cloudinary.com/blog/ automatically_art_directed_responsive_imagesIntelligent resizing
http://cloudinary.com/blog/ automatically_art_directed_responsive_imagesHigh contrast tricks
https://blog.imgix.com/2015/10/21/automatic- point-of-interest-cropping-with-imgix.html🔯
What about information that isn’t in the image?
Machine learning and artificial intelligence to the rescue
Automated alternative text (Facebook)
Image may contain: dog,- utdoor and nature
- utdoor and nature
How?
Making photos findable…
https://photos.google.comLearning from good data…
http://image-net.org/Learning from *lots* of data…
http://image-net.org/Learning from *lots* of data…
https://github.com/- penimages/dataset
Learning from *lots* of data…
https://github.com/- penimages/dataset
Refining the data with language
https://research.googleblog.com/2016/09/show-and-tell-image-captioning-open.htmlCompare and enhance…
Detect syntax and mix and match
Add visual information
Adding automated content in context…
https://research.googleblog.com/2016/05/aw-so-cute-allo-helps-you-respond-to.htmlAPIs and demos to use yourself…
Detecting humans…
Detect Faces…
Verify Faces
Cluster automatically…
🦅
Empowering people…
CHRIS HEILMANN @CODEPO8 CHRISTIANHEILMANN.COM
THANKS!