News classification
Contact us
- Add: No. 9, North Fourth Ring Road, Haidian District, Beijing. It mainly includes face recognition, living detection, ID card recognition, bank card recognition, business card recognition, license plate recognition, OCR recognition, and intelligent recognition technology.
- Tel: 13146317170 廖经理
- Fax:
- Email: 398017534@qq.com
Visualization of AI artificial intelligence CNN model
Visualization of AI artificial intelligence CNN model
Everyone understands the convolutional neural network CNN, but it is still not well known about the features it extracts at each layer and the progress of the training, so this time through the visualization of the model to how the neural network trains in each layer. of. We know that the neural network itself includes a series of feature extractors, and the ideal feature map should be sparse and include typical partial information. After the model visualization, we can have some intuitive views and help us debug the model. For example, the feature map is very close to the original image, clarifying that it has not learned any features; perhaps it is simply a solid color diagram, stating that it is too sparse, can be We have too many feature maps (too many feature_maps also reflect that the convolution kernel is too small). There are many kinds of visualizations, such as: feature map visualization, weight visualization, etc. I take the feature map visualization as an example.
Model visualization
Since I didn't find the googLeNet inception v3 pre-trained on the dataset of the imagenet 1000 with paddlepaddle, I used keras for the experiment. The following figure is output:
Output image
Beiqi Sic Bo D50:
Feature map visualization
Take the first 15 layers of the network, and take the first 3 feature maps for each layer.
Beiqi Sic Bo D50 feature map:
Looking from left to right, you can see the whole process of feature extraction, some from the background, some extract contours, some extract color differences, but you can also find that the two feature maps on the 10th and 11th layers are solid colors. The number of feature maps is a bit more, and the halo of the Beiqi Sic Bo D50 can also be seen clearly in the effect of the halo in the feature map.
Hypercolumns
Usually we use the initial fc full convergence layer of the neural network as the characteristic representation of the whole picture, but this representation can be too rough (as can be seen from the feature map visualization below), it is impossible to accurately depict some spatial features, and the network The first layer of spatial features is too accurate, lacking semantic information (such as the color difference, contour, etc.), so the paper "Hypercolumns for Object Segmentation and Fine-grained Localization" proposes a new feature representation method: Hypercolumns - will A pixel's hypercolumn is defined as a vector of all cnn units corresponding to the activation input values of the pixel position), and the tradeoff is better than the last two scores.
Model visualization
Since I didn't find the googLeNet inception v3 pre-trained on the dataset of the imagenet 1000 with paddlepaddle, I used keras for the experiment. The following figure is output:
Output image
Beiqi Sic Bo D50:
Feature map visualization
Take the first 15 layers of the network, and take the first 3 feature maps for each layer.
Beiqi Sic Bo D50 feature map:
Looking from left to right, you can see the whole process of feature extraction, some from the background, some extract contours, some extract color differences, but you can also find that the two feature maps on the 10th and 11th layers are solid colors. The number of feature maps is a bit more, and the halo of the Beiqi Sic Bo D50 can also be seen clearly in the effect of the halo in the feature map.
Hypercolumns
Usually we use the initial fc full convergence layer of the neural network as the characteristic representation of the whole picture, but this representation can be too rough (as can be seen from the feature map visualization below), it is impossible to accurately depict some spatial features, and the network The first layer of spatial features is too accurate, lacking semantic information (such as the color difference, contour, etc.), so the paper "Hypercolumns for Object Segmentation and Fine-grained Localization" proposes a new feature representation method: Hypercolumns - will A pixel's hypercolumn is defined as a vector of all cnn units corresponding to the activation input values of the pixel position), and the tradeoff is better than the last two scores.