Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Twitter is implementing Machine Learning to preview images in timelines

Recommended Posts

Posted · Original PosterOP



This was a bit of news @RadeonInstinct shared on their twitter from the twitter blog https://twitter.com/RadeonInstinct/status/957342515337793536


...millions of images are uploaded to Twitter every day. However, they can come in all sorts of shapes and sizes, which presents a challenge for rendering a consistent UI experience. The photos in your timeline are cropped to improve consistency and to allow you to see more Tweets at a glance.

They continue with


Previously, we used face detection to focus the view on the most prominent face we could find. While this is not an unreasonable heuristic, the approach has obvious limitations since not all images contain faces. Additionally, our face detector often missed faces and sometimes mistakenly detected faces when there were none. If no faces were found, we would focus the view on the center of the image. This could lead to awkwardly cropped preview images.

Twitter has looked into  eye tracking data from academics records (Check the blog for illustrations)


A region having high saliency means that a person is likely to look at it when freely viewing the image. Academics have studied and measured saliency by using eye trackers, which record the pixels people fixated with their eyes. In general, people tend to pay more attention to faces, text, animals, but also other objects and regions of high contrast. This data can be used to train neural networks and other algorithms to predict what people might want to look at.

They then state that the tech is too slow for use in production. Although they don't need to run this on  every  single  image  since they have 


...developed a pruning technique to iteratively[1] remove feature maps of the neural network which were costly to compute but did not contribute much to the performance. To decide which feature maps to prune, we computed the number of floating point operations required for each feature map and combined it with an estimate of the performance loss that would be suffered by removing it.

The blog post ends with 


Together, these two methods allowed us to crop media 10x faster than just a vanilla implementation of the model and before any implementation optimizations. This lets us perform saliency detection on all images as soon as they are uploaded and crop them in real-time.

These updates are currently in the process of being rolled out to everyone  on twitter.com, iOS and Android. 

Plus an acknowledgment to the people that have made this happen.

1. Iteration is the act of repeating a process, to generate a sequence of outcomes, with the aim of approaching a desired goal, target or result.



Personly; I think that this is really cool, as long as it's only used for image cropping :P

Correct grammar? Where we're going; we don't need correct grammar!

-that is the internet if you didn't get it...

Link to post
Share on other sites

"cropping media"


Alright Twitter, whatever you say...

Intel Core i7 5820K | BeQuiet! Dark Rock Pro 4 | ASUS RVE | Trident Z 3200MHz 4x4GB | GTX 980 K|NGP|N 2-Way SLi

Samsung Galaxy S7 Edge Black 32GB | Exynos 8890 Octa | SanDisk Ultra 200GB SDXC

1 | 2 | 3 | 4 | Valley | Superposition

Link to post
Share on other sites
1 hour ago, potoooooooo said:

Literally all i want is my tweets in chronological order

TweetBot is a reason I might want an iPhone since there's no good option for a Twitter client on Android. The regular app is a mess and the tweets are all out of order.


EDIT - Just tried Twidere and it's actually pretty good. No ads or promoted tweets.

Link to post
Share on other sites

Hey random Twitter employee in this forum, 280 characters and machine learning is all nice but all we want is to display Tweets in a chronological order and an edit function. 

There is more that meets the eye
I see the soul that is inside

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now