SlideShare a Scribd company logo
1 of 30
Download to read offline
Üçlü	Yitim	Fonksiyonu	Tabanlı	Derin	Gömme	ile	Yüz	Duygu	
Sınıflandırması
Cenk	Bircanoğlu,	Nafiz	Arıca	
Bilgisayar	Mühendisliği	Bölümü
Bahçeşehir	Universitesi
İçerik
◦ Giriş
◦ Yitim	Fonksiyonları
◦ Üçlü	Yitim	Fonksiyonu
◦ Derin	Mimariler
◦ Deneyler
◦ Sonuç
Yüz	Duygu	Sınıflandırması
Evrensel	olarak	geçerli	olan,	7	yüz	
duygu	ifadesinin	(kızgınlık,	iğrenme,	
korku,	şaşkınlık,	mutluluk,	üzülme	ve	
nötr),	yüz	imgeleri	üzerinde	
sınıflandırılmasıdır.
◦
Derin	Gömme
Yitim	Fonksiyonları
◦ Liste	Bazlı	Yitim	Fonksiyonları
◦ İkili	Yitim	Fonksiyonları
◦ Üçlü	Yitim	Fonksiyonları
◦ Melez	Yitim	Fonksiyonları
Liste	Bazlı	Yitim	Fonksiyonları
◦ Derin	Gömme	öznitelik	vektörleri	ve	karşılık	
gelen	sınıf	değerleri	girdi	olarak	verilir.	
◦ En	yaygın	olarak	kullanılan	
◦ Çapraz	Entropi	(Cross	Entropy),	
◦ Softmax	ve	
◦ Hinge	fonksiyonları
◦ N	elemanlı	bir	yığın	için	N	elemanlı	bir	liste	
üzerinden	hata	hesaplaması	yapılmaktadır.
İkiz	Yitim	Fonksiyonları
◦ Ikili	örnekler	üzerinden	hata	hesabı	yapılmaktadır.
◦ Aynı	sınıfa	ait	olan	ikililer	genel	olarak	1	ile	farklı	sınıfa	ait	olanlar	ise	0	
veya	-1	ile	etiketlenir.	
◦ En	yaygın	fonksiyonlar;
◦ Kosinüs	Benzerlik	fonksiyonu,	
◦ ikili	Hinge	fonksiyonu,	
◦ Hadsell,	Margin,	
◦ Double	Margin,	
◦ Kullback-Leibler	Divergence
◦ N	elemanlı	bir	yığın	için	N2 elemanlı	bir	liste	üzerinden	hata	
hesaplaması	yapılmaktadır.
Üçüz	Yitim	Fonksiyonları
◦ İkisi	aynı	diğeri	farklı	sınıftan	olacak	şekilde	Üçlü	
örnekler	üzerinden	hata	hesabı	yapılmaktadır.
◦ Her	biri	n	elemanlı	k	adet	sınıf	söz	konusu	
olduğunda	toplam	üçlü	sayısı		nC2 k
◦ En	yaygın	fonksiyonlar;
◦ Üçlü	yitim
◦ Uzaklık	oranı	ve	türevleri
Melez	Yitim	Fonksiyonları
◦ İkiz	ve	Üçüz	yitim	fonksiyonlarının	harmanlanması	sonucu	oluşturulmuş	olan	
yitim	fonksiyonlarıdır.
◦ Large	Margin	Nearest	Neighbor	ve	Lifted	Structured	Similarity	Softmax	
fonksiyonları	bu	grupta	değerlendirilir.
Üçlü	Yitim	Fonksiyonu
Şekil-1:	Üçlü	Yitim	Fonksiyonu	Eğitimi	[1]
Üçlü	Seçimi
◦ Uç	pozitif	ve	uç	negatif	seçimi:
◦ Seçilen	her	dayanak	noktası	için,	seçilecek	olan	pozitif	değer	dayanak	noktasına	en	uzak	olan	ve	
seçilecek	olan	negatif	ise	en	yakın	olan	olmalıdır.
◦ Hesaplama	olarak	fazla	maliyet	getirmektedir.
◦ Yarı	uç	negatif	seçimi:
◦ Seçilen	dayanak	noktası	için	her	pozitif	değer	teker	teker	ele	alınır	ve	dayanak	noktasına	pozitiften	
daha	yakın	olan	tüm	negatifler	için	(a,p,n)	üçlüleri	oluşturulur.
Genel Mimari
◦ Herhangi	bir	ön	işleme	yöntemi	kullanılmamıştır.
◦ Derin	Öğrenme	ile	N	boyutlu	Öklid	uzayında	1	birimlik	öznitelik	vektörleri	
oluşturulur.
◦ Oluşturulan	öznitelik	vektörleri	üzerinden	Destek	Vektör	Makinaları	(DVM)	
algoritması	kullanılarak	sınıflandırma	işlemi	yapılır.
◦ Derin	öğrenme	de	eğitim	kümesi	olarak	kullanılan	imgelerin	öznitelik	
vektörleri	DVM	için	de	eğitim	kümesi	olarak	kullanılmaktadır.
Derin Mimariler
◦ Literatürde	en	yaygın	olarak	kullanılan	üç	farklı	Yapay	Sinir	Ağı	modeli	
kullanılmıştır.
◦ AlexNet
◦ VGG-16
◦ NN-4
◦ 128	boyutlu	öznitelik	vektörleri	oluşturulmuştur.
◦ Üçlü	yitim	fonksiyonu	için	hata	payı	0.2	olarak	alınmıştır.
AlexNet
◦ Alex	Krizhevsky	tarafından,	LeNet	mimarisinin	
geliştirmesi	ile	oluşmuştur.
◦ 2012	ImageNet	yarışmasında	gösterdiği	
performansla	ünlenmiştir.
◦ 5	evrişimli,	3	lineer	katmandan	oluşmaktadır.
◦ Max	Pooling	ve	ReLU	fonksiyonlarının	kullanılması	
önceki	çalışmalara	göre	farklılık	göstermektedir.
VGG-16
◦ AlexNet’ten	esinlenilerek	Oxford	Üniversitesi	çalışma	
grubu	tarafından	geliştirilen	bir	mimaridir.
◦ 13	evrişim	3	lineer	olmak	üzere	16	katmana	sahiptir.
◦ Tüm	evrişim	katmanlarında	3x3	çekirdek	boyutu	
kullanılmıştır.
◦ AlexNet’e	göre	bellekte	daha	fazla	yer	kaplar	ve	hız	
olarak	daha	yavaştır.	Daha	kompleks	modellemeler	
yapılabilmektedir.
NN-4
◦ VGG	modelininin	yavaş	ve	büyük	boyutlu	olması	
sorunlarını	çözmek	için	geliştirilmiştir.
◦ VGG	ve	AlexNet’e	göre	esas	farkı	Inception	denilen	
katmandır.
◦ En	büyük	iki	yüz	duygu	sınıflandırma	veri	kümesi
◦ Candid-Images-for-Facial-Expression	
◦ 10330	eğitim,	4426	test	olmak	üzere	toplam	14756	imge
◦ GaMO
◦ 10818	eğitim,	4637	test,	olmak	üzere	toplam	15455 imge
◦ Kişilerin	serbest	ortamlarda	elde	edilmiş	(in-the-wild)	
◦ Sınıflar	dengesiz	olarak	dağılmış
Duygu Kızgınlık İğrenme Korku Mutluluk Yalın	 Üzülme Şaşkınlık
CIFE 1905 975 1381 3636 2381 2485 1993
GaMO 1945 1838 1586 3185 2741 1898 2262
Veri	Kümeleri
Deneyler
Test	
Sonuçları
Üçlü
İkili	
(Siamese)
Sınıflandırma	
(Hinge	Yitim)
AlexNet VGG AlexNet VGG AlexNet VGG En	İyi
CIFE 0.7091 0.7796	 0.6777	 0.7444	 0.6976 0.7509	 0.76
GaMO 0.7697 0.7903 0.7387	 0.7795	 0.7643	 0.7818	 0.75
CIFE	
Çapraz	
GaMO
0.3717 0.3807 0.3626	 0.3468 0.3513	 0.3746	 0.31
GaMO	
Çapraz	
CIFE
0.3741 0.4159	 0.3849 0.3667	 0.3581	 0.3874 0.64
CIFE	Hata	Matrisi GaMO	Hata	Matrisi
Sonuç	ve	Değerlendirme
◦ Üçlü	Yitim	fonksiyonuyla	diğer	yitim	fonksiyonlarına	göre	daha	yüksek	başarı	
oranı	elde	edildi.
◦ VGG	mimarisi	AlexNet	ve	NN4’e	göre	daha	başarılı	sonuçlar	üretti.	
◦ Diğer	farklı	yitim	fonksiyonu	için	deneyler	tekrarlandı.	Farklı	melez	yitim	
fonksiyonları	geliştirildi:
◦ Üçlü	+	Çapraz	Entropi
◦ Margin	ve	Çapraz	Entropi
Q&A
Teşekkürler

More Related Content

Featured

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 

Featured (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Facial Emotion Classification Using Deep Embedding with Triplet Loss Function