---
marp: true
paginate: true
author: Laurent Fainsin, Damien Guillotin, Pierre-Eliot Jourdan
math: katex
---
# Projet IAM
## SimCLR + SGAN
![bg 100%](https://images.unsplash.com/photo-1600174097100-3f347cf15996?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8)
---
Images d'animaux $\rightarrow$ 18 classes différentes
| | | |
| :----------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------: |
| ![height:225px](https://github.com/axelcarlier/projsemisup/blob/master/Lab/Chacal/23954942153_7c3b7c0ec5_c.jpg?raw=true) | ![height:225px](https://github.com/axelcarlier/projsemisup/blob/master/Lab/Z%C3%A8bre/51854102817_e3ae6af27f_c.jpg?raw=true) | ![height:225px](https://github.com/axelcarlier/projsemisup/blob/master/Lab/autruche/48114752957_be666e72ca_c.jpg?raw=true) |
| ![height:225px](https://github.com/axelcarlier/projsemisup/blob/master/Lab/Girafe/19646362821_2cda943958_c.jpg?raw=true) | ![height:225px](https://github.com/axelcarlier/projsemisup/blob/master/Lab/Lion/51110276872_152f4fdf38_c.jpg?raw=true) | ![height:225px](https://github.com/axelcarlier/projsemisup/blob/master/Lab/Gnou/6967679426_ce23f4fef3_c.jpg?raw=true) |
---
### Dataset
- Données labellisées $\rightarrow$ 20 images/classe $\rightarrow$ 360 images
- Données non labellisées $\rightarrow$ 2000 images
- Données de test $\rightarrow$ 100 images/classe $\rightarrow$ 1800 images
### Model
- Input $\rightarrow$ 128x128px
- Network $\rightarrow$ [MobileNetV1](https://www.tensorflow.org/api_docs/python/tf/compat/v1/keras/applications/mobilenet)
---
# Méthode contrastive
(SimCLR)
![bg 50%](https://camo.githubusercontent.com/5ab5e0c019cdd8129b4450539231f34dc028c0cd64ba5d50db510d1ba2184160/68747470733a2f2f312e62702e626c6f6773706f742e636f6d2f2d2d764834504b704539596f2f586f3461324259657276492f414141414141414146704d2f766146447750584f79416f6b4143385868383532447a4f67457332324e68625877434c63424741735948512f73313630302f696d616765342e676966)
---
![width:800](https://1.bp.blogspot.com/-bO6c2IGpXDY/Xo4cR6ebFUI/AAAAAAAAFpo/CPVNlMP08hUfNPHQb2tKeHju4Y_UsNzegCLcBGAsYHQ/s640/image3.png)
![width:400](https://1.bp.blogspot.com/-ZzzYCgg9g0s/Xo4bo4oj7bI/AAAAAAAAFpc/W-LAIS28d1sJ3-KETCXlaxvLKlS_KG8-QCLcBGAsYHQ/s320/image1.png)
---
# Méthode contrastive
(SimCLR)
![bg 50%](https://miro.medium.com/max/720/1*E6UUEmxKp5ZTRgCRNbIP-g.webp)
---
$$l_{i,j} = -\log \frac{ \exp( \text{sim}(z_i, z_j) / \tau ) }{\sum^{2N}_{k=1\neq i} \exp( \text{sim}(z_i, z_j) / \tau) }$$
---
# Résultats fully-supervised
![bg 98%](assets/baseline_accuracy_simclr.png)
![bg 98%](assets/baseline_loss_simclr.png)
---
# Résultats semi-supervised
![bg 98%](assets/accuracy_simclr.png)
![bg 98%](assets/loss_simclr.png)
---
# Résultats supervised fine-tuning
![bg 98%](assets/finetuning_accuracy_simclr.png)
![bg 98%](assets/finetuning_loss_simclr.png)
---
# Comparaison des résultats
![height:620px](assets/comp_accuracy_simclr.png)
---
# Méthode générative (SGAN)
![bg 60%](https://miro.medium.com/max/640/1*Grve_j-Mv4Jgmtq3u7yKyQ.webp)
---
![bg 110%](https://cdn.discordapp.com/attachments/953586522572066826/1068158716945379358/Screenshot_from_2023-01-26_14-04-44.png)
![bg 100%](https://cdn.discordapp.com/attachments/953586522572066826/1068157883717517382/a_1.png)
---
| | 5 epochs | 100 epochs |
| :---------------------------------------: | :----------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------: |
| !pretrain
| ![](https://cdn.discordapp.com/attachments/953586522572066826/1068113375474753566/download4.png) | ![](https://cdn.discordapp.com/attachments/953586522572066826/1065674997672190082/download2.png) |
| pretrain
| ![](https://cdn.discordapp.com/attachments/953586522572066826/1068115321807962122/image.png) | ![](https://cdn.discordapp.com/attachments/953586522572066826/1067144843610034227/download3.png) |
---
# Résultats fully-supervised
![height:620px](assets/baseline_accuracy_sgan.png)
---
# Résultats semi-supervised
![height:620px](assets/accuracy_sgan.png)
---
![height:620px](assets/pretrain_accuracy_sgan.png)
---
# Comparaison des résultats
![height:620px](assets/comp_accuracy_sgan.png)