fix some todos and spelling errors
All checks were successful
Build Typst document / build_typst_documents (push) Successful in 21s
All checks were successful
Build Typst document / build_typst_documents (push) Successful in 21s
This commit is contained in:
@ -18,7 +18,7 @@ Each category comprises a set of defect-free training images and a test set of i
|
||||
|
||||
In this bachelor thesis only two categories are used. The categories are "Bottle" and "Cable".
|
||||
|
||||
The bottle category contains 3 different defect classes: 'broken_large', 'broken_small' and 'contamination'.
|
||||
The bottle category contains 3 different defect classes: _broken_large_, _broken_small_ and _contamination_.
|
||||
#subpar.grid(
|
||||
figure(image("rsc/mvtec/bottle/broken_large_example.png"), caption: [
|
||||
Broken large defect
|
||||
@ -34,8 +34,8 @@ The bottle category contains 3 different defect classes: 'broken_large', 'broken
|
||||
label: <full>,
|
||||
)
|
||||
|
||||
Whereas cable has a lot more defect classes: 'bent_wire', 'cable_swap', 'combined', 'cut_inner_insulation',
|
||||
'cut_outer_insulation', 'missing_cable', 'missing_wire', 'poke_insulation'.
|
||||
Whereas cable has a lot more defect classes: _bent_wire_, _cable_swap_, _combined_, _cut_inner_insulation_,
|
||||
_cut_outer_insulation_, _missing_cable_, _missing_wire_, _poke_insulation_.
|
||||
So many more defect classes are already an indication that a classification task might be more difficult for the cable category.
|
||||
|
||||
#subpar.grid(
|
||||
@ -72,31 +72,33 @@ So many more defect classes are already an indication that a classification task
|
||||
|
||||
=== Few-Shot Learning
|
||||
Few-Shot learning is a subfield of machine-learning which aims to train a classification-model with just a few or no samples at all.
|
||||
In contrast to traditional supervised learning where a huge amount of labeled data is required is to generalize well to unseen data.
|
||||
So the model is prone to overfitting to the few training samples.#cite(<parnami2022learningexamplessummaryapproaches>)
|
||||
In contrast to traditional supervised learning, where a huge amount of labeled data is required to generalize well to unseen data,
|
||||
here we only have 1-10 samples per class (so called shots).
|
||||
So the model is prone to overfitting to the few training samples and this means they should represent the whole sample distribution as good as possible.~#cite(<parnami2022learningexamplessummaryapproaches>)
|
||||
|
||||
Typically a few-shot leaning task consists of a support and query set.
|
||||
Where the support-set contains the training data and the query set the evaluation data for real world evaluation.
|
||||
A common way to format a few-shot leaning problem is using n-way k-shot notation.
|
||||
For Example 3 target classeas and 5 samples per class for training might be a 3-way 5-shot few-shot classification problem.#cite(<snell2017prototypicalnetworksfewshotlearning>)#cite(<patchcorepaper>)
|
||||
For Example 3 target classes and 5 samples per class for training might be a 3-way 5-shot few-shot classification problem.~@snell2017prototypicalnetworksfewshotlearning @patchcorepaper
|
||||
|
||||
A classical example of how such a model might work is a prototypical network.
|
||||
These models learn a representation of each class and classify new examples based on proximity to these representations in an embedding space.#cite(<snell2017prototypicalnetworksfewshotlearning>)
|
||||
These models learn a representation of each class in a reduced dimensionality and classify new examples based on proximity to these representations in an embedding space.~@snell2017prototypicalnetworksfewshotlearning
|
||||
|
||||
#figure(
|
||||
image("rsc/prototype_fewshot_v3.png", width: 60%),
|
||||
caption: [Prototypical network for few-shots. #cite(<snell2017prototypicalnetworksfewshotlearning>)],
|
||||
caption: [Prototypical network for 3-ways and 5-shots. #cite(<snell2017prototypicalnetworksfewshotlearning>)],
|
||||
) <prototypefewshot>
|
||||
|
||||
The first and easiest method of this bachelor thesis uses a simple ResNet to calucalte those embeddings and is basically a simple prototypical network.
|
||||
See @resnet50impl.~#cite(<chowdhury2021fewshotimageclassificationjust>)
|
||||
The first and easiest method of this bachelor thesis uses a simple ResNet50 to calucalte those embeddings and clusters the shots together by calculating the class center.
|
||||
This is basically a simple prototypical network.
|
||||
See @resnet50impl.~@chowdhury2021fewshotimageclassificationjust
|
||||
|
||||
=== Generalisation from few samples
|
||||
|
||||
An especially hard task is to generalize from such few samples.
|
||||
In typical supervised learning the model sees thousands or millions of samples of the corresponding domain during learning.
|
||||
This helps the model to learn the underlying patterns and to generalize well to unseen data.
|
||||
In few-shot learning the model has to generalize from just a few samples.
|
||||
In few-shot learning the model has to generalize from just a few samples.#todo[Source?]#todo[Write more about. eg. class distributions]
|
||||
|
||||
=== Softmax
|
||||
#todo[Maybe remove this section]
|
||||
|
Reference in New Issue
Block a user