[CS231n] 2. Image Classification

회준 권·2024년 12월 8일

CS231n

목록 보기
1/7

〰️ 내용 요약

[1] challenges in Image Classification for models to maintain robustness

  • Illumination (조명)
  • Deformation (변형)
  • Occlusion
  • Intraclass variation

want to come up with an algorithm that fits well with all the objects in the nature

A need for data-driven approach which
1) collects a dataset of images and labels
2) uses ML Classifier for training
3) use new images for classification

The easiest classifier is NN Classifier using L1 distance

[2] NN classifier & Distance Metrics

L1 distance is the metric used for classification

What's the python code for it?

A problem with NN Classifier is that
it's fast at training, but slow at testing and we want it vise-versa


The shape of the decision boundary slightly change depending on which distance metric is used

Then the question is which K for NN Classifier & which distance metric?

It is problem-dependent

L1 distance is used when the topology or the space of the region is well known
L2 distance can be used elsewhere

So as these hyperparameters are problem dependent, we need to try different combinations of them using train and validation set.

[3] Setting Hyperparameters

Therefore the need for splitting data into train/vali/test to choose the right hyperparameters

Train + Validation -> Cross-Validation
Mostly used in small datasets

[4] Linear Classifier (parametrized classifier)

By looking through Parametric Approach, as we input our Image x, and weights X, we get 10 numbers giving scores of each class

f(x,W) = Wx + b (x: input, W: weight matrix)

Then how can we choose this W to be the best choice?

As we get a 2 X 2 image, we stretch it out into a column.

Then what could be the problem with Linear Classifiers?

XOR Problem

〰️ 첨언

Nearest Neighbour & Distance Metrics

where are KNN used? classificiation?
what distance metrics are there? how does L1 differ from L2?

Linear Classifier

can only learn one category?

0개의 댓글