SlideShare a Scribd company logo
1 of 76
Download to read offline
Speaker: Romain Futrzynski, Peltarion
Organizers: David Rydén, Filip Wästberg, Stockholm Data Science
Agenda What is image similarity?
Deep learning solution
Why does it work?
How to improve?
It’s a way to compare images to know if they share similar content
What is image similarity?
What is image similarity?
It’s a way to compare images to know if they share similar content
Similar content is loosely defined
– Independent of resolution
– Independent of translation, rotation
– Independent of color
– Independent of style
– Independent of object
Images have meaning
What is image similarity?
It’s a way to compare images to know if they share similar content
Compare is precisely quantified
– These are 98.647% similar:
– Reverse search
What can you do with similarity?
lotr, image, samwise
Chrysophylax Dives
Dragon
Alan Lee - Farmer Giles of Ham
Biographical Information
Hoard In the mountains, composed of
gold, silver, rings, necklaces, jewels,
diamonds, and more
– Exploration
What can you do with similarity?
– Face recognition
What can you do with similarity?
– Landmark recognition
What can you do with similarity?
– Data clustering
What can you do with similarity?
Let’s get started?
How to search similar content?
– Compare pixel by pixel? 1 MPixels -> 1 million operations to check 1 image!
?
– Compare pixel by pixel? 1 MPixels -> 1 million operations to check 1 image!
– Find key points (?)
How to search similar content?
?
How to search similar content?
– Compare pixel by pixel? 1 MPixels -> 1 million operations to check 1 image!
– Find key points (?)
– Measure bright/dark areas (?)
?
How to search similar content?
Non-image content?
– Text
– Bank records
– Music
– Customer profiles
Comparing is slow Similar isn’t specific
Make
comparison fast
💡 Compress the data
6 MB
?
💡 Compress the data
– Compare compressed data
– Search 6000x faster! 6 MB
1 kB
?
?
✅ Search is fast Similar isn’t specific
Quantify similarity
Information should be preserved
6 MB 1 kB
compress
Information should be preserved
6 MB 1 kB
compress
decompress
– Preserves information
– Takes in “any” type of data
– Fix-sized layer
– Continuous function
Autoencoder network
encoder decoder
Is compressed data comparable?
encoder decoder
?
Is compressed data comparable?
encoder decoder
?
zip unzip NO
Complexity of encoder-decoder may prevent easy comparison
md5 hash md5 hack NO
Decoder needs to be simple
encoder decoder
– Makes compressed data
easily comparable
Decoder needs to be simple
encoder decoder
– Makes compressed data
easily comparable
– Can’t reconstruct data well
Decoder needs to be simple
encoder decoder
– Makes compressed data
easily comparable
– Can’t reconstruct data well
– Preserve some information
Decoder needs to be simple
encoder decoder
Sam
That’s a classification problem!
Sam
Cosine similarity
Horse
or not
Classification network
Horse
or not
Encoder creates points
= (1.3; 2.2)
Horse
or not
Encoder creates points
= (1.3; 2.2)
X Y
Decoder draws lines
horse
not
horse
Horse
or not
= (X; Y)
Decoder draws lines
= (X; Y)
horsenot
horse
not
dolphin
dolphin
Horse | Dolphin
Decoder draws lines
not horse
not dolhpin
not tiger
= (X; Y)
Horse | Dolphin | Tiger
Decoder draws lines
– Categories mutually exclusive
– Many categories should organize as circle
Decoder draws lines
– Categories mutually exclusive
– Many categories should organize as circle
Categories can be identified by their relative angle
Trigonometry
Degree is not a convenient unit
– Where is 36° ?
??
?
?
angle: 5.2° 36° 83° 177°
cos(angle): 0.995 0.8 0.12 -0.998
Trigonometry
angle angle angle angle
cosine cosine cosine cosine
✅ Search is fast ✅ Similar is measurable
Demo preview
– Upload a catalogue of images
Similarity search demo
index
Import
– Upload a catalogue of images
– Pick a model
Similarity search demo
index
– Upload a catalogue of images
– Pick a model
– Index the images
Similarity search demo
index
– Upload a catalogue of images
– Pick a model
– Index the images
– Compress the query
Similarity search demo
index
– Upload a catalogue of images
– Pick a model
– Index the images
– Compress the query
– Compare compressed values
Similarity search demo
index
– Upload a catalogue of images
– Pick a model
– Index the images
– Compress the query
– Compare compressed values
– Pull top 3 matches from catalogue
Similarity search demo
index
Is that new?
“Similarity”
“Classification”
Hummin
gbird
Hummin
gbird
Focusing similarity
Instance classification
– Decoder simple
Wu, Z., Xiong, Y., Yu, S. X., & Lin, D. (2018). Unsupervised Feature Learning via Non-parametric Instance Discrimination. Proceedings of the IEEE
Computer Society Conference on Computer Vision and Pattern Recognition, 3733–3742. https://doi.org/10.1109/CVPR.2018.00393
Instance classification
– Decoder simple
– Preserve some information by learning category
Sam
Instance classification
– Decoder simple
– Preserve some information by learning category
– Preserve all information by learning individual examples
Sam
That one picture called
img_59875.jpg
Instance classification
– Works without labels
– “Squeeze your eyes” model: no semantic information
– Continuity and small embedding size push similar images together
– Individual classification prevents hash collision
Classification
– Labels give semantic information
– “Squeeze your eyes” still plays a part
Multi-label classification
– Extra semantic information
Species: Horse/Zebra/Tiger…
Vegetarian: Yes/No
Aquatic: Yes/No
To me,
– Odd numbers (1,3,5...) are more similar than Even numbers (2,4,6...)
– Consecutive numbers are more similar
Express similarity as a probability for the loss function:
Explicit similarity
compared to: 1 3 5 7 9 0
In degrees: 0° 22.5° 45° 66° 90° 90°
In cos sim: 1 0.92 0.70 0.38 0 0
In crossentropy
probability:
0.95 0.05 0.00001 0.0000... 0 0
Explicit similarity
angle = 22.5°
cos(angle) = 0.92
angle = 90°
cos(angle) = 0
compared to: 1 3 5 7 9 0
In degrees: 0 22.5 45 67.5 90 90
In cos sim: 1 0.92 0.70 0.38 0 0
In crossentropy
probability:
0.95 0.05 0.00001 0.00... 0 0
Contrastive loss
– Tune double-network
– Predict similar or not
cosine
similarity
0
Wang, J., Song, Y., Leung, T., Rosenberg, C., Wang, J., Philbin, J., … Wu, Y. (2014). Learning fine-grained image similarity with deep ranking.
Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 1386–1393. https://doi.org/10.1109/CVPR.2014.180
Contrastive loss
– Tune double-network
– Predict similar or not
cosine
similarity
1
Wang, J., Song, Y., Leung, T., Rosenberg, C., Wang, J., Philbin, J., … Wu, Y. (2014). Learning fine-grained image similarity with deep ranking.
Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 1386–1393. https://doi.org/10.1109/CVPR.2014.180
Contrastive loss
– Tune double-network
– Predict similar or not
– Siamese weights or not
– Replace comparator
1
Garcia, N., & Vogiatzis, G. (2019). Learning non-metric visual similarity for image retrieval. Image and Vision Computing, 82, 18–25.
https://doi.org/10.1016/j.imavis.2019.01.001
– Tune double-network
– Predict similar or not
– Siamese weights or not
– Replace comparator
– Reference, positive, negative triplet
Triplet loss
1
0
0
Hermans, A., Beyer, L., & Leibe, B. (2017). In Defense of the Triplet Loss for Person Re-Identification. Retrieved from
http://arxiv.org/abs/1703.07737
– Tune double-network
– Predict similar or not
– Siamese weights or not
– Replace comparator
– 8 inputs
Octoplet loss
1001
0100
0101
0110
0010
1111
0101
0111
Summary
Image similarity is a way to quantify
visual and semantics of images
Deep neural networks can compress general data
to make comparison fast
Cosine similarity gives intuitive values
You can train models using anything from
- No extra information
- Labeled information
- Arbitrary “is similar” information
Speaker: Romain Futrzynski, Peltarion
Organizers: David Rydén, Filip Wästberg, Stockholm Data Science
Unknown images
not horse
not dolhpin
not tiger
= (X; Y)
Horse | Dolphin | Tiger
Unknown images
not horse
not dolhpin
not tiger
= (X; Y)
Horse | Dolphin | Tiger
?
Unknown images
not horse
not dolhpin
not tiger
= (X; Y)
Horse | Dolphin | Tiger
?
Unknown images
not horse
not dolhpin
not tiger
= (X; Y)
Horse | Dolphin | Tiger
?
Unknown images
not horse
not dolhpin
not tiger
= (X; Y)
Horse | Dolphin | Tiger
?
Unknown images
= (X; Y)
Horse | Dolphin | Tiger
Labeling distances
– Deduce distances from dataset organization
Distance: 1 2 3 4
ImageNet: Same image with noise /
augmentation
Image in same category Image from other
category
Labeling distances
– Deduce distances from dataset organization
Distance: 1 2 3 4
ImageNet: Same image with noise /
augmentation
Image in same category Image from other
category
Large image: Same image with noise /
augmentation
Neighbor in space / time /
sequence
Gildenblat, J., & Klaiman, E. (2019). Self-Supervised Similarity Learning for Digital Pathology. 1–8. Retrieved from
http://arxiv.org/abs/1905.08139
Labeling distances
– Deduce distances from dataset organization
Distance: 1 2 3 4
ImageNet: Same image with noise /
augmentation
Image in same category Image from other
category
Large image: Same image with noise /
augmentation
Neighbor in space / time /
sequence
Text: Following sentence Same book Same author Same century

More Related Content

What's hot

Chapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel RelationChapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel RelationVarun Ojha
 
Image processing7 frequencyfiltering
Image processing7 frequencyfilteringImage processing7 frequencyfiltering
Image processing7 frequencyfilteringshabanam tamboli
 
Lecture 13 (Usage of Fourier transform in image processing)
Lecture 13 (Usage of Fourier transform in image processing)Lecture 13 (Usage of Fourier transform in image processing)
Lecture 13 (Usage of Fourier transform in image processing)VARUN KUMAR
 
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...Simplilearn
 
Feature detection - Image Processing
Feature detection - Image ProcessingFeature detection - Image Processing
Feature detection - Image ProcessingRitesh Kanjee
 
Point processing
Point processingPoint processing
Point processingpanupriyaa7
 
Feature selection concepts and methods
Feature selection concepts and methodsFeature selection concepts and methods
Feature selection concepts and methodsReza Ramezani
 
Image Classification using deep learning
Image Classification using deep learning Image Classification using deep learning
Image Classification using deep learning Asma-AH
 
Image segmentation
Image segmentationImage segmentation
Image segmentationDeepak Kumar
 
Backpropagation in Convolutional Neural Network
Backpropagation in Convolutional Neural NetworkBackpropagation in Convolutional Neural Network
Backpropagation in Convolutional Neural NetworkHiroshi Kuwajima
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Suraj Aavula
 
Python Seaborn Data Visualization
Python Seaborn Data Visualization Python Seaborn Data Visualization
Python Seaborn Data Visualization Sourabh Sahu
 
Real Time Object Tracking
Real Time Object TrackingReal Time Object Tracking
Real Time Object TrackingVanya Valindria
 
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...Simplilearn
 
K-means Clustering
K-means ClusteringK-means Clustering
K-means ClusteringAnna Fensel
 

What's hot (20)

Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Chapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel RelationChapter 2 Image Processing: Pixel Relation
Chapter 2 Image Processing: Pixel Relation
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
Image processing7 frequencyfiltering
Image processing7 frequencyfilteringImage processing7 frequencyfiltering
Image processing7 frequencyfiltering
 
Lecture 13 (Usage of Fourier transform in image processing)
Lecture 13 (Usage of Fourier transform in image processing)Lecture 13 (Usage of Fourier transform in image processing)
Lecture 13 (Usage of Fourier transform in image processing)
 
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
 
CIFAR-10
CIFAR-10CIFAR-10
CIFAR-10
 
Feature detection - Image Processing
Feature detection - Image ProcessingFeature detection - Image Processing
Feature detection - Image Processing
 
Point processing
Point processingPoint processing
Point processing
 
Feature selection concepts and methods
Feature selection concepts and methodsFeature selection concepts and methods
Feature selection concepts and methods
 
Image Classification using deep learning
Image Classification using deep learning Image Classification using deep learning
Image Classification using deep learning
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Line Detection
Line DetectionLine Detection
Line Detection
 
Backpropagation in Convolutional Neural Network
Backpropagation in Convolutional Neural NetworkBackpropagation in Convolutional Neural Network
Backpropagation in Convolutional Neural Network
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
 
Python Seaborn Data Visualization
Python Seaborn Data Visualization Python Seaborn Data Visualization
Python Seaborn Data Visualization
 
Real Time Object Tracking
Real Time Object TrackingReal Time Object Tracking
Real Time Object Tracking
 
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
 
K-means Clustering
K-means ClusteringK-means Clustering
K-means Clustering
 

Similar to Image similarity with deep learning

Using content-based multimedia similarity search for learning
Using content-based multimedia similarity search for learningUsing content-based multimedia similarity search for learning
Using content-based multimedia similarity search for learningsuzreader
 
Semi-Supervised.pptx
Semi-Supervised.pptxSemi-Supervised.pptx
Semi-Supervised.pptxTamer Nadeem
 
Lecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matchingLecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matchingcairo university
 
Neo4j - graph database for recommendations
Neo4j - graph database for recommendationsNeo4j - graph database for recommendations
Neo4j - graph database for recommendationsproksik
 
Neo4j graphdatabaseforrecommendations-130531021030-phpapp02-converted
Neo4j graphdatabaseforrecommendations-130531021030-phpapp02-convertedNeo4j graphdatabaseforrecommendations-130531021030-phpapp02-converted
Neo4j graphdatabaseforrecommendations-130531021030-phpapp02-convertedsnehapandey01
 
Generational Adversarial Neural Networks - Essential Reference
Generational Adversarial Neural Networks - Essential ReferenceGenerational Adversarial Neural Networks - Essential Reference
Generational Adversarial Neural Networks - Essential ReferenceGokul Alex
 
Brain Maps like Mine
Brain Maps like MineBrain Maps like Mine
Brain Maps like MineVanessa S
 
How can we train with few data
How can we train with few dataHow can we train with few data
How can we train with few dataDong Heon Cho
 
Object recognition
Object recognitionObject recognition
Object recognitionsaniacorreya
 
Fashion product de-duplication with image similarity and LSH
Fashion product de-duplication with image similarity and LSHFashion product de-duplication with image similarity and LSH
Fashion product de-duplication with image similarity and LSHEddie Bell
 
Artificial Intelligence and Optimization with Parallelism
Artificial Intelligence and Optimization with ParallelismArtificial Intelligence and Optimization with Parallelism
Artificial Intelligence and Optimization with ParallelismOlivier Teytaud
 
SLA Nov2009 Public
SLA Nov2009 PublicSLA Nov2009 Public
SLA Nov2009 Publicaspoerri
 
Computer Vision image classification
Computer Vision image classificationComputer Vision image classification
Computer Vision image classificationWael Badawy
 
Retrieving Visually-Similar Products for Shopping Recommendations using Spark...
Retrieving Visually-Similar Products for Shopping Recommendations using Spark...Retrieving Visually-Similar Products for Shopping Recommendations using Spark...
Retrieving Visually-Similar Products for Shopping Recommendations using Spark...Databricks
 
Anomaly Detection for Real-World Systems
Anomaly Detection for Real-World SystemsAnomaly Detection for Real-World Systems
Anomaly Detection for Real-World SystemsManojit Nandi
 
Computer Vision descriptors
Computer Vision descriptorsComputer Vision descriptors
Computer Vision descriptorsWael Badawy
 
Learning a Joint Embedding Representation for Image Search using Self-supervi...
Learning a Joint Embedding Representation for Image Search using Self-supervi...Learning a Joint Embedding Representation for Image Search using Self-supervi...
Learning a Joint Embedding Representation for Image Search using Self-supervi...Sujit Pal
 
Graph Based Machine Learning with Applications to Media Analytics
Graph Based Machine Learning with Applications to Media AnalyticsGraph Based Machine Learning with Applications to Media Analytics
Graph Based Machine Learning with Applications to Media AnalyticsNYC Predictive Analytics
 

Similar to Image similarity with deep learning (20)

Using content-based multimedia similarity search for learning
Using content-based multimedia similarity search for learningUsing content-based multimedia similarity search for learning
Using content-based multimedia similarity search for learning
 
Semi-Supervised.pptx
Semi-Supervised.pptxSemi-Supervised.pptx
Semi-Supervised.pptx
 
Lecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matchingLecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matching
 
Neo4j - graph database for recommendations
Neo4j - graph database for recommendationsNeo4j - graph database for recommendations
Neo4j - graph database for recommendations
 
Neo4j graphdatabaseforrecommendations-130531021030-phpapp02-converted
Neo4j graphdatabaseforrecommendations-130531021030-phpapp02-convertedNeo4j graphdatabaseforrecommendations-130531021030-phpapp02-converted
Neo4j graphdatabaseforrecommendations-130531021030-phpapp02-converted
 
Generational Adversarial Neural Networks - Essential Reference
Generational Adversarial Neural Networks - Essential ReferenceGenerational Adversarial Neural Networks - Essential Reference
Generational Adversarial Neural Networks - Essential Reference
 
Brain Maps like Mine
Brain Maps like MineBrain Maps like Mine
Brain Maps like Mine
 
How can we train with few data
How can we train with few dataHow can we train with few data
How can we train with few data
 
Object recognition
Object recognitionObject recognition
Object recognition
 
Fashion product de-duplication with image similarity and LSH
Fashion product de-duplication with image similarity and LSHFashion product de-duplication with image similarity and LSH
Fashion product de-duplication with image similarity and LSH
 
Artificial Intelligence and Optimization with Parallelism
Artificial Intelligence and Optimization with ParallelismArtificial Intelligence and Optimization with Parallelism
Artificial Intelligence and Optimization with Parallelism
 
Recognition
RecognitionRecognition
Recognition
 
SLA Nov2009 Public
SLA Nov2009 PublicSLA Nov2009 Public
SLA Nov2009 Public
 
DeepLearning
DeepLearningDeepLearning
DeepLearning
 
Computer Vision image classification
Computer Vision image classificationComputer Vision image classification
Computer Vision image classification
 
Retrieving Visually-Similar Products for Shopping Recommendations using Spark...
Retrieving Visually-Similar Products for Shopping Recommendations using Spark...Retrieving Visually-Similar Products for Shopping Recommendations using Spark...
Retrieving Visually-Similar Products for Shopping Recommendations using Spark...
 
Anomaly Detection for Real-World Systems
Anomaly Detection for Real-World SystemsAnomaly Detection for Real-World Systems
Anomaly Detection for Real-World Systems
 
Computer Vision descriptors
Computer Vision descriptorsComputer Vision descriptors
Computer Vision descriptors
 
Learning a Joint Embedding Representation for Image Search using Self-supervi...
Learning a Joint Embedding Representation for Image Search using Self-supervi...Learning a Joint Embedding Representation for Image Search using Self-supervi...
Learning a Joint Embedding Representation for Image Search using Self-supervi...
 
Graph Based Machine Learning with Applications to Media Analytics
Graph Based Machine Learning with Applications to Media AnalyticsGraph Based Machine Learning with Applications to Media Analytics
Graph Based Machine Learning with Applications to Media Analytics
 

Recently uploaded

INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAbdelrhman abooda
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfJohn Sterrett
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhijennyeacort
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]📊 Markus Baersch
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home ServiceSapana Sha
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
vip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Book
vip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Bookvip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Book
vip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Bookmanojkuma9823
 

Recently uploaded (20)

INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdf
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
vip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Book
vip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Bookvip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Book
vip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Book
 

Image similarity with deep learning

  • 1. Speaker: Romain Futrzynski, Peltarion Organizers: David Rydén, Filip Wästberg, Stockholm Data Science
  • 2. Agenda What is image similarity? Deep learning solution Why does it work? How to improve?
  • 3. It’s a way to compare images to know if they share similar content What is image similarity?
  • 4. What is image similarity? It’s a way to compare images to know if they share similar content Similar content is loosely defined – Independent of resolution – Independent of translation, rotation – Independent of color – Independent of style – Independent of object Images have meaning
  • 5. What is image similarity? It’s a way to compare images to know if they share similar content Compare is precisely quantified – These are 98.647% similar:
  • 6. – Reverse search What can you do with similarity? lotr, image, samwise Chrysophylax Dives Dragon Alan Lee - Farmer Giles of Ham Biographical Information Hoard In the mountains, composed of gold, silver, rings, necklaces, jewels, diamonds, and more
  • 7. – Exploration What can you do with similarity?
  • 8. – Face recognition What can you do with similarity?
  • 9. – Landmark recognition What can you do with similarity?
  • 10. – Data clustering What can you do with similarity?
  • 12. How to search similar content? – Compare pixel by pixel? 1 MPixels -> 1 million operations to check 1 image! ?
  • 13. – Compare pixel by pixel? 1 MPixels -> 1 million operations to check 1 image! – Find key points (?) How to search similar content? ?
  • 14. How to search similar content? – Compare pixel by pixel? 1 MPixels -> 1 million operations to check 1 image! – Find key points (?) – Measure bright/dark areas (?) ?
  • 15. How to search similar content? Non-image content? – Text – Bank records – Music – Customer profiles
  • 16. Comparing is slow Similar isn’t specific
  • 18. 💡 Compress the data 6 MB ?
  • 19. 💡 Compress the data – Compare compressed data – Search 6000x faster! 6 MB 1 kB ? ?
  • 20. ✅ Search is fast Similar isn’t specific
  • 22. Information should be preserved 6 MB 1 kB compress
  • 23. Information should be preserved 6 MB 1 kB compress decompress
  • 24. – Preserves information – Takes in “any” type of data – Fix-sized layer – Continuous function Autoencoder network encoder decoder
  • 25. Is compressed data comparable? encoder decoder ?
  • 26. Is compressed data comparable? encoder decoder ? zip unzip NO Complexity of encoder-decoder may prevent easy comparison md5 hash md5 hack NO
  • 27. Decoder needs to be simple encoder decoder
  • 28. – Makes compressed data easily comparable Decoder needs to be simple encoder decoder
  • 29. – Makes compressed data easily comparable – Can’t reconstruct data well Decoder needs to be simple encoder decoder
  • 30. – Makes compressed data easily comparable – Can’t reconstruct data well – Preserve some information Decoder needs to be simple encoder decoder Sam
  • 34. Horse or not Encoder creates points = (1.3; 2.2)
  • 35. Horse or not Encoder creates points = (1.3; 2.2) X Y
  • 37. Decoder draws lines = (X; Y) horsenot horse not dolphin dolphin Horse | Dolphin
  • 38. Decoder draws lines not horse not dolhpin not tiger = (X; Y) Horse | Dolphin | Tiger
  • 39. Decoder draws lines – Categories mutually exclusive – Many categories should organize as circle
  • 40. Decoder draws lines – Categories mutually exclusive – Many categories should organize as circle Categories can be identified by their relative angle
  • 41. Trigonometry Degree is not a convenient unit – Where is 36° ? ?? ? ?
  • 42. angle: 5.2° 36° 83° 177° cos(angle): 0.995 0.8 0.12 -0.998 Trigonometry angle angle angle angle cosine cosine cosine cosine
  • 43. ✅ Search is fast ✅ Similar is measurable
  • 45. – Upload a catalogue of images Similarity search demo index Import
  • 46. – Upload a catalogue of images – Pick a model Similarity search demo index
  • 47. – Upload a catalogue of images – Pick a model – Index the images Similarity search demo index
  • 48. – Upload a catalogue of images – Pick a model – Index the images – Compress the query Similarity search demo index
  • 49. – Upload a catalogue of images – Pick a model – Index the images – Compress the query – Compare compressed values Similarity search demo index
  • 50. – Upload a catalogue of images – Pick a model – Index the images – Compress the query – Compare compressed values – Pull top 3 matches from catalogue Similarity search demo index
  • 53. Instance classification – Decoder simple Wu, Z., Xiong, Y., Yu, S. X., & Lin, D. (2018). Unsupervised Feature Learning via Non-parametric Instance Discrimination. Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 3733–3742. https://doi.org/10.1109/CVPR.2018.00393
  • 54. Instance classification – Decoder simple – Preserve some information by learning category Sam
  • 55. Instance classification – Decoder simple – Preserve some information by learning category – Preserve all information by learning individual examples Sam That one picture called img_59875.jpg
  • 56. Instance classification – Works without labels – “Squeeze your eyes” model: no semantic information – Continuity and small embedding size push similar images together – Individual classification prevents hash collision
  • 57. Classification – Labels give semantic information – “Squeeze your eyes” still plays a part
  • 58. Multi-label classification – Extra semantic information Species: Horse/Zebra/Tiger… Vegetarian: Yes/No Aquatic: Yes/No
  • 59. To me, – Odd numbers (1,3,5...) are more similar than Even numbers (2,4,6...) – Consecutive numbers are more similar Express similarity as a probability for the loss function: Explicit similarity compared to: 1 3 5 7 9 0 In degrees: 0° 22.5° 45° 66° 90° 90° In cos sim: 1 0.92 0.70 0.38 0 0 In crossentropy probability: 0.95 0.05 0.00001 0.0000... 0 0
  • 60. Explicit similarity angle = 22.5° cos(angle) = 0.92 angle = 90° cos(angle) = 0 compared to: 1 3 5 7 9 0 In degrees: 0 22.5 45 67.5 90 90 In cos sim: 1 0.92 0.70 0.38 0 0 In crossentropy probability: 0.95 0.05 0.00001 0.00... 0 0
  • 61. Contrastive loss – Tune double-network – Predict similar or not cosine similarity 0 Wang, J., Song, Y., Leung, T., Rosenberg, C., Wang, J., Philbin, J., … Wu, Y. (2014). Learning fine-grained image similarity with deep ranking. Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 1386–1393. https://doi.org/10.1109/CVPR.2014.180
  • 62. Contrastive loss – Tune double-network – Predict similar or not cosine similarity 1 Wang, J., Song, Y., Leung, T., Rosenberg, C., Wang, J., Philbin, J., … Wu, Y. (2014). Learning fine-grained image similarity with deep ranking. Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 1386–1393. https://doi.org/10.1109/CVPR.2014.180
  • 63. Contrastive loss – Tune double-network – Predict similar or not – Siamese weights or not – Replace comparator 1 Garcia, N., & Vogiatzis, G. (2019). Learning non-metric visual similarity for image retrieval. Image and Vision Computing, 82, 18–25. https://doi.org/10.1016/j.imavis.2019.01.001
  • 64. – Tune double-network – Predict similar or not – Siamese weights or not – Replace comparator – Reference, positive, negative triplet Triplet loss 1 0 0 Hermans, A., Beyer, L., & Leibe, B. (2017). In Defense of the Triplet Loss for Person Re-Identification. Retrieved from http://arxiv.org/abs/1703.07737
  • 65. – Tune double-network – Predict similar or not – Siamese weights or not – Replace comparator – 8 inputs Octoplet loss 1001 0100 0101 0110 0010 1111 0101 0111
  • 66. Summary Image similarity is a way to quantify visual and semantics of images Deep neural networks can compress general data to make comparison fast Cosine similarity gives intuitive values You can train models using anything from - No extra information - Labeled information - Arbitrary “is similar” information
  • 67. Speaker: Romain Futrzynski, Peltarion Organizers: David Rydén, Filip Wästberg, Stockholm Data Science
  • 68. Unknown images not horse not dolhpin not tiger = (X; Y) Horse | Dolphin | Tiger
  • 69. Unknown images not horse not dolhpin not tiger = (X; Y) Horse | Dolphin | Tiger ?
  • 70. Unknown images not horse not dolhpin not tiger = (X; Y) Horse | Dolphin | Tiger ?
  • 71. Unknown images not horse not dolhpin not tiger = (X; Y) Horse | Dolphin | Tiger ?
  • 72. Unknown images not horse not dolhpin not tiger = (X; Y) Horse | Dolphin | Tiger ?
  • 73. Unknown images = (X; Y) Horse | Dolphin | Tiger
  • 74. Labeling distances – Deduce distances from dataset organization Distance: 1 2 3 4 ImageNet: Same image with noise / augmentation Image in same category Image from other category
  • 75. Labeling distances – Deduce distances from dataset organization Distance: 1 2 3 4 ImageNet: Same image with noise / augmentation Image in same category Image from other category Large image: Same image with noise / augmentation Neighbor in space / time / sequence Gildenblat, J., & Klaiman, E. (2019). Self-Supervised Similarity Learning for Digital Pathology. 1–8. Retrieved from http://arxiv.org/abs/1905.08139
  • 76. Labeling distances – Deduce distances from dataset organization Distance: 1 2 3 4 ImageNet: Same image with noise / augmentation Image in same category Image from other category Large image: Same image with noise / augmentation Neighbor in space / time / sequence Text: Following sentence Same book Same author Same century