Any observer can sense the artistic style of painting, even if it takes training to articulate it. To an art historian, the artistic style is the primary means of classifying the painting . However, artistic style is not well defined, and may be loosely described as “.. a distinctive manner which permits the grouping of works into related categories” . Algorithmically determining the artistic style of an artwork is a challenging problem which may include analysis of features such as the painting’s color, its texture, and its subject matter, or none of those at all. Detecting the style of a digitized image of a painting poses additional challenges raised by the digitization process, which itself has consequences that may affect the ability of a machine to correctly detect artistic style; for instance, textures may be affected by the resolution of the digitization. Despite these challenges, intelligent systems for detecting artistic style would be useful for identification and retrieval of images of a similar style.
In this paper we investigate several methods based on recent advances in convolutional neural networks for large-scale determination of artistic style. In particular, we adapt the neural-style algorithm introduced in  for large-scale style classification, showing performance that is competitive with other deep convolutional neural network based approaches.
2 Related Work
Algorithmic determination of artistic style in paintings has only been considered sporadically in the past. Examples of early efforts at style classification are  and , where the datasets used are quite small, and only a handful of very distinct artistic style categories considered. Several complex models are constructed in  by hand-engineering features on a large dataset similar to the one used for this work. And in , it is demonstrated that convolutional neural networks may be effective for understanding image style in general, including artistic style in paintings. In the papers just mentioned the number of artistic style categories is held to a relatively small 25 and 27 broadly defined style categories arespectively.
In the paper “A Neural Algorithm of Artistic Style”, it is demonstrated that the correlations between the low-level feature activations in a deep convolutional neural network encode sufficient information about the style of the input image to permit a tranfer of the visual style of the input image onto a new image via an algorithm informally referred to as the “neural-style” algorithm . An example of the output of this algorithm is presented in Figure 1. Several authors have built upon the work of Gatys et. al. in the past year , , , . These investigations have primarily focused on ways to improve either the quality of the style transfer or the efficiency of the algorithm. To the best of our knowledge the only other look at the use of the style representation of an image as a classifier is in .
3 Data and Methods
The data used for this investigation consists of 76449 digitized images of fine art paintings. The vast majority of the images were originally obtained from http://www.wikiart.org
, the largest online repository of fine-art paintings. For convenience, we utilize a prepackaged set of images sourced and prepared by Kiri Nichols and hosted by the data-science competition websitehttp://www.kaggle.com. A stratified 10% of the dataset was held out for validation purposes. We chose to use a finer set of style categories for classification than has been used in previous work on image style, as we believe that finer classification is likely necessary for practical application. We utilize 70 distinct style categories, the maximum amount possible while maintaining at least 100 observations of each style category. This noticably increases the complexity of the classification task as many of the class boundaries are not well-defined, the classes are unbalanced, and there are not nearly as many examples of each of the artistic styles as in previous attempts at large-scale artistic style classification.
3.2 The Neural Style Algorithm
The primary insight in the neural-style algorithm outlined by Gatys et. al. is that the correlations between low-level feature activations in a convolutional neural network capture information about the style of the image, while higher-level feature activations capture information about the content of the image. Thus, to construct an image that merges both the style of an image and the content of an image
where is the number of filters in the layer, is the spatial dimensionality of the feature map, and represent the feature maps extracted by the network at layer from the images and respectively, and letting represent the feature maps extracted by the network at layer from the image , and . That is, the style loss, which encodes the images style, is a loss taken over Gram matrices for filter activations.
3.3 Style Classification
|Accuracy (top 1%)|
|Convolutional Neural Network||27.47|
|Pretrained Residual Neural Network||36.99|
To establish a baseline for style classification, we first trained a single convolutional neural network from scratch. The network has a uniform structure consisting of convolutional layers with 3x3 kernels and leaky ReLUs activations (
). Between every pair of convolutional layers is a fractional max pooling layer with a 3x3 kernel. Fractional max-pooling is used as given the relatively small size of the dataset, the more commonly used average or max-pooling operations would lead to rapid data loss and a relatively shallow network. The convolutional layer sizes are
followed by a fully-connected layer and 70-way softmax. 10% dropout is applied to the fully connected layer. Aside from mean normalization and horizontal flips, the data were not augmented in any way. The model was trained over 55 epochs using stochastic gradient descent and achieved a top 1% accuracy of 27.468%.
We then finetuned a pretrained object classification model for style classification. The pretrained model used was a residual neural network with 50 layers pretrained on the ImageNet 2015 dataset. There are two motivating factors for choosing to finetune this network. The first is that residual networks currently exhibit the best on object recognition tasks, and previous work on style classification suggests that a network trained for the task of object recognition and then finetuned for image style detection will perform the task well, 
. The second and more interesting reason from the standpoint of artistic style classification is that the architecture of a residual neural network makes the outputs of lower levels of the network available to higher levels in the network. In this way, the net functions similar to a Long Short-Term Memory network without gates. For style classification, this is particularly appealing as a means of allowing the higher levels in the net to consider both lower-level features and higher-level features when forming an artistic style classification, where the style may very much be determined by the lower-level features. The residual neural network model obtained top-1% accuracy of 36.985%.
To determine whether or not the style representation encoded in the Gram matrices for a given image has any power as a classifier, we extracted the Gram matrices of feature activations at layers ReLU1_1, ReLU2_1, ReLu3_1, ReLu4_1, and ReLU5_1 from a VGG-19 network for the paintings described above . The choice of network and layers was based on the quality of the style transfers obtained with these choices in 
. The pretrained VGG-19 model was obtained from the Caffe Model Zoo. The Gram matrices were then reshaped to account for symmetry, producing a total of 304,416 distinct features per image, nearly a factor of four greater that the total number of observations in the dataset.
Analyzing the style representation was approached in two ways. First, the full feature vector was normalized and then passed to a single-layer linear classifier which was trained using Adam over 55 epochs, producing a top 1% accuracy of 13.23%.
We then built random forest classifiers on the individual Gram matrices extracted from the activations of the network. The dimensionality of the Gram matrices post-reshaping is 2016, 8128, 32640, 130816, and 130816 respectively. Considered separately, the random forest classifiers built on the first three of these style representations performed better than the linear classifier based on the full style representation and better than the baseline convolutional neural network, with top-1% accuracies of 27.84%, 28.97%, and 33.46%. The random forests built on the latter two layers performed considerably worse. The results are presented in table2.
In contrast to results reported in 
, we observed a significant loss in accuracy when dimensionality reduction was even lightly utilized on these smaller layers. For instance, performing PCA while preserving 90% of the variance in the data from the layer ReLU1_1 style representation reduced the accuracy of the random forest model on that layer from 27.84% to 17%, perhaps due to our use of a larger, less homogeneous dataset. We also saw no significant gains when the data were normalized.
|Accuracy (top 1%)|
|Full Style Representation - Linear Classifier||13.21|
|ReLU1_1 Random Forest||27.84|
|ReLU2_1 Random Forest||28.97|
|ReLU3_1 Random Forest||33.46|
|ReLU4_1 Random Forest||9.79|
|ReLU5_1 Random forest||10.18|
4 Conclusion & Future Work
The ‘neural-style’ representation of an artwork offers competitive performance as an artistic style classifier; nevertheless, in our experiments a finetuned deep neural network still obtains superior results. Our best results using the ‘neural-style’ representation of artistic style were obtained when models suitable for high-dimensional nonlinear data were constructed individually on the first three Gram matrices that form the building blocks of the style representation.
It appears that the art-historical definition of artistic style is not quite what is captured by the neural style algorithm using this network and these layers. Nevertheless it is clear that this information is relevant and has some predictive ability, and understanding and improving on these results is a target for future work.
The author would like to thank NVIDIA for GPU donation to support this research, Wikiart.org for providing many of the images, the website Kaggle.com for hosting the data, and Kiri Nichols for sourcing the data.
-  Fernie, E. Art History and its Methods: A Critical Anthology. London: Phaidon, 1995.
-  Gatys, L. A., Ecker, A. S., and Bethge, M. Image style transfer using convolutional neural networks. In (2016), pp. 2414–2423.
-  Graham, B. Fractional max-pooling. CoRR abs/1412.6071 (2014).
-  He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. CoRR abs/1512.03385 (2015).
-  Jia, Y., Shelhamer, E., Donahue, J., Karayev, S., Long, J., Girshick, R., Guadarrama, S., and Darrell, T. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093 (2014).
Johnson, J., Alahi, A., and Fei-Fei, L.
Perceptual losses for real-time style transfer and super-resolution.In European Conference on Computer Vision (2016).
-  Karayev, S., Hertzmann, A., Winnemoeller, H., Agarwala, A., and Darrell, T. Recognizing image style. CoRR abs/1311.3715 (2013).
Recognizing image style and activities in video using local features and naive bayes.Pattern Recogn. Lett. 24, 16 (Dec 2003), 2913–2922.
-  Kingma, D. P., and Ba, J. Adam: A method for stochastic optimization. In Proceedings of the 3rd International Conference on Learning Representations (ICLR) (2014).
-  Lang, B. The Concept of Style. Cornell University Press, 1987.
Matsuo, S., and Yanai, K.
Cnn-based style vector for style image retrieval.In Proceedings of the 2016 ACM on International Conference on Multimedia Retrieval (New York, NY, USA, 2016), ICMR ’16, ACM, pp. 309–312.
-  Novak, R., and Nikulin, Y. Improving the neural algorithm of artistic style. CoRR abs/1605.04603 (2016).
-  Ruder, M., Dosovitskiy, A., and Brox, T. Artistic style transfer for videos. arXiv preprint arXiv:1604.08610 (2016).
-  Saleh, B., and Elgammal, A. Large-scale classification of fine-art paintings: Learning the right metric on the right feature. In International Conference on Data Mining Workshops (2015), IEEE.
-  Shamir, L., Macura, T., Orlov, N., Eckley, D. M., and Goldberg, I. G. Impressionism, expressionism, surrealism: Automated recognition of painters and schools of art. ACM Trans. Appl. Percept. 7, 2 (feb 2010), 8:1–8:17.
-  Simonyan, K., and Zisserman, A. Very deep convolutional networks for large-scale image recognition. CoRR abs/1409.1556 (2014).
-  Srivastava, R. K., Greff, K., and Schmidhuber, J. Training very deep networks. In Advances in Neural Information Processing Systems (2015), pp. 2377–2385.