cs231 Learning notes one image recognition and knn_ machine learning

Source: Internet
Author: User

Course Address: http://cs231n.github.io/classification/


Image recognition is to give you a picture, classify it as a group of a given category. As shown in Figure 1, given a picture, as well as the possible category {cat, dog, hat, cup}, requires that the picture be identified to what kind. A picture in the computer, is actually converted into a three-dimensional tensor (wide * high * color channel), such as Figure one is 248 x x 3 A total of 297,600 data, each data value range is 0 to 255.

Fig. 1 Image recognition is a core problem of computer vision, which has a lot of practical applications. And many seemingly different computer vision tasks can be converted into image recognition, such as target detection and image segmentation. But it also faces the challenges of the computer vision task, as shown in Figure 2. A good image recognition algorithm should be invariant to the following variables, sensitive to the variables between classes. Angle change: A picture can be photographed from different angles: the size of the same object may be different deformation: the shape of the object may not be a fixed defect: sometimes only part of the object appears in the image illumination condition: the intensity of the light will have a dramatic effect on the pixel value of the picture. Background clutter: The object's color is similar to the background color, which makes it difficult to identify the differences within the class: Even the same objects have different forms of expression. Fig. 2 k nearest Neighbor K nearest neighbor is simple: find the K training sample from the nearest test sample and vote according to the category of K Training sample. The actual use of K nearest neighbor, to pay attention to the following: to standardize data by characteristics (normalization) if the data is high-dimensional, consider the dimensionality reduction process to divide the training data into training sets and test sets. The training set of experience is 70%-90%, depending on the number of parameters and the size of the expected super parameter. If the super parameter is more, the training set occupies the proportion to be smaller. If there is less training data, K-fold cross-validation can be considered. Of course, the greater the K, the better the effect, but the calculation costs will be greater. The parameters are mainly K-neighbors and defined distances. If the KNN computation time is too long, may consider uses the Flann to speed up the speed K nearest neighbor has the following shortcoming: needs to store the training set data test needs to retrieve the entire training set as well as the storage training sample and the test sample distance, So no matter the time complexity or the complexity of the space is very high, especially when the training set is very large

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.