cs231_image classification

Take cat as an example:

Insert picture description here

Difficulties encountered by the computer in identifying cat tags (here is a cat as an example)

1. The brightness of the light
2. The cat has different postures
3. The cat is blocked by other physics and the rest is visible
4. Background interference
5. Intra-class differences (cat's color, size, etc.)
6. Observed viewing angle changes, etc.

There is actually no obvious way to recognize cats, or other types (dogs, deer, extensions, etc.)

Image classification process:

1. Collect a large number of data sets and label them with defined labels.
2. Recognize what the collected data set looks like through machine learning and have common characteristics of the same label, and then form a training model (classifier) ​​in some way, which summarizes how to recognize different object categories.
3. Finally, we apply the training model to the new image so that we can recognize cats, dogs, fish, trucks, etc.

Classifier using L1 and L2 distanceInsert picture description here

Insert picture description here

From a geometric point of view, L2 can better reflect the difference between the two images than L1, but it needs to be analyzed in a specific situation, and which effect is better to use.

K-Nearest Neighbor Classifier

thought:

For the pictures that need to be tested, we look for the labels of the most similar K images, vote on the test pictures in turn, and use the label of the image with the highest number of votes as the label of the test picture. (When K=1, it is the Nearest Neighbor classifier, and will not be described in detail) How to determine the K value (of course, try different values, which one is better)
### Generally we will divide the data into training set and test set , The test set is an important basis for your final conclusion, so we will use a part of the training set to test the best K value, and this part of the data is called the validation set.

Cross-validation

For example: Divide the training set into 3 parts equally, divide each part into 3 parts, 2 parts for training, 1 part for verification, and then we take 2 parts for training and 1 part for verification in a loop. Take the average of all 3 verification results as the algorithm verification result. (I don’t understand the specific practice temporarily)

c3d data segmentation mode

Divided into training set and test set at a ratio of 3:1, the determination of k value needs to be studied. Follow-up to make up. Then after the model is trained, use the model to run a test set, and use this result to evaluate the pros and cons of the algorithm used.

Guess you like

Origin blog.csdn.net/better_boy/article/details/106985357