Tipo di tesi |
Tesi di laurea magistrale |
Autore |
POLIMENI, GIOVANNI
|
URN |
etd-11132023-172746 |
Titolo |
Combining CNN and MetaFormer for Image Classification |
Titolo in inglese |
Combining CNN and MetaFormer for Image Classification |
Struttura |
Dipartimento di Ingegneria "Enzo Ferrari" |
Corso di studi |
Ingegneria informatica (D.M.270/04) |
Commissione |
Nome Commissario |
Qualifica |
BARALDI LORENZO |
Primo relatore |
|
Parole chiave |
- CNN
- Computer Vision
- Image Classification
- MetaFormer
- Transformer
|
Data inizio appello |
2023-12-05 |
Disponibilità |
Accessibile via web (tutti i file della tesi sono accessibili) |
Riassunto analitico
I modelli di Deep Learning basati sulla convoluzione sono in grado di codificare informazioni spaziali precise (a livello di pixel) e quindi di catturare informazioni contestuali locali, tuttavia la limitata dimensione del kernel che caratterizza le CNN diminuisce la possibilità di apprendere dipendenze a lungo raggio all'interno dell'immagine, dipendenze fondamentali per una classificazione accurata. Ciò che rappresenta il punto debole delle CNN è invece la forza di un Transformer che è in grado di catturare e apprendere queste dipendenze a lungo raggio. Il problema del Transformer è che la capacità di apprendere informazioni globali si accompagna ad una complessità quadratica rispetto alla dimensione dell'immagine e alla difficoltà di catturare informazioni localizzate, punto di forza delle CNN. Un'altra differenza tra i due modelli è il filtro. Nelle CNN il filtro non dipende dall'input e i pesi del filtro sono condivisi tra pixel e immagini. Questa condivisione dei filtri garantisce un training più efficiente per le CNN. Nel Transformer, il filtro di attenzione è dinamico perché dipende dall'input, questa caratteristica garantisce la capacità di modellare una relazione più complessa tra i pixel, ma aumenta la probabilità di overfitting. Date queste ragioni, in questa tesi è stata sviluppata una nuova architettura per la classificazione delle immagini che ha le caratteristiche intrinseche sia della CNN che del Transformer. Il punto di partenza di questa architettura è il CAFormer che viene modificato per garantire un modello che possieda tutte le caratteristiche sopra descritte. Tra le modifiche apportate, ci sono: l'introduzione di nuove operazioni per lo scaling del residual branch, l'aggiunta di un blocco SE nella prima parte del blocco MetaFormer e l'introduzione di token mixer più leggeri per evitare di aumentare eccessivamente la complessità del modello. Nella fase di test, il modello creato raggiunge prestazioni superiori rispetto al CAFormer su CIFAR 10 e CIFAR 100 con complessità simile.
|
Abstract
Deep Learning models based on convolution are able to encode precise (pixel-level) spatial information and therefore to capture local contextual information, however the limited kernel size that characterizes CNNs decreases the possibility of learning long-range dependencies within the image, dependencies that are fundamental for accurate classification. What represents the weakness of CNNs is instead the strength of a Transformer that is able to capture and learn these long-range dependencies. The problem of the Transformer is that the ability to learn global information is accompanied by a quadratic complexity with respect to the image size and the difficulty in capturing localized information, a strong point of CNNs. Another difference between the two models is the filter. In the CNN the filter doesn’t’ depend on the input and the filter weights are shared across pixels and images. This sharing of filters ensures efficient training for CNNs. In the Transformer, the attention filter is dynamic because it depends on input, this feature ensures to model more complex relationship between pixels but it increases the probability of overfitting. Given these reasons, in this thesis it has been developed a new architecture for image classification that has the inductive biases of both the CNN and the Transformer. The starting point of this architecture is the CAFormer which is modified to ensure a model that possesses all the characteristics described above. Among the changes made, there are: introduction of new operations for scaling the residual branch, addition of a SE block in the first part of the MetaFormer block and introduction of lighter token mixers to avoid excessively increasing the complexity of the model. In the testing phase, the created model achieves superior performance compared to CAFormer on CIFAR 10 and CIFAR 100 with similar complexity.
|
File |
Nome file |
Dimensione |
Tempo di download stimato
(Ore:Minuti:Secondi) |
28.8 Modem |
56K Modem |
ISDN (64 Kb) |
ISDN (128 Kb) |
piu' di 128 Kb |
|
Tesi_Finale.pdf |
3.15 Mb |
00:14:33 |
00:07:29 |
00:06:33 |
00:03:16 |
00:00:16 |
Contatta l'autore
|
|