<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by David Faes on Medium]]></title>
        <description><![CDATA[Stories by David Faes on Medium]]></description>
        <link>https://medium.com/@faesdavid?source=rss-102987697cfe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*PYsM8Dmgw4eKN_v8</url>
            <title>Stories by David Faes on Medium</title>
            <link>https://medium.com/@faesdavid?source=rss-102987697cfe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 19:54:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@faesdavid/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Convolving the Canvas: Transfer Learning in Art Classification]]></title>
            <link>https://medium.com/@faesdavid/convolving-the-canvas-transfer-learning-in-art-classification-64d2fec69b8c?source=rss-102987697cfe------2</link>
            <guid isPermaLink="false">https://medium.com/p/64d2fec69b8c</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[convolutional-network]]></category>
            <category><![CDATA[digital-art]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[David Faes]]></dc:creator>
            <pubDate>Thu, 10 Aug 2023 02:18:39 GMT</pubDate>
            <atom:updated>2023-08-10T02:33:58.295Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>The bourgeoning popularity of digital art collections and marketplaces has driven an increasing need to manage, analyze and classify large volumes of data in terms of abstract aesthetic concepts — such as space, form, texture and tone — making the development of reliable art classification models imperative. Such models are not only tools for archivists, dealers and gallerists; they can also serve as a catalyst for creatives.</p><p>Regardless of the specific application, the task remains the same: to mechanically extract salient features of particular artworks. Here, neural networks become instrumental thanks to their ability to identify patterns using computational statistics.</p><p>In my work on transfer learning for art classification, I’ve found that domain specific transfer learning may be especially valuable. When I compared an artist classification model pre-trained on a more general task — namely, image classification on ImageNet—to a model pre-trained on painting style classification, I saw an 8.6% jump in accuracy. This underscores the potential advantages of leveraging specialized models for transfer learning which could boost model performance despite restricted sample sizes due to the relatively small size of digital art collections.</p><p>While this finding points to promising directions for further research, I hope to delve deeper and share subsequent insights, providing a repository outlining my process. For now, this post serves as a starting point and look into existing research.</p><h3>Transfer Learning in Art Classification</h3><p>In their seminal article on art classification models, <a href="https://arxiv.org/pdf/1505.00855.pdf">Saleh &amp; Elgammal (2015)</a> proposed three learning-based tasks that have since become standard for developing painting classification models: identifying a given painting’s (1) artist, its (2) genre and its (3) style.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*Ue7T0pJ0JZwTGFUw5QDRcg.png" /><figcaption>Illustration of <a href="https://arxiv.org/pdf/1505.00855.pdf">Saleh &amp; Elgammal’s (2015)</a> system for classifying fine-art paintings.</figcaption></figure><p>Since 2015, there has been a proliferation of convolutional neural network (CNN) models trained on these three tasks. The achievements of such models is in part propelled by massive hand-labeled datasets such as <a href="https://ieeexplore.ieee.org/document/5206848">ImageNet</a>, home to over 15 million high-resolution images each painstakingly labeled by hand. Likewise, pre-trained models such as <a href="https://arxiv.org/abs/1408.5093">CaffeNet</a>, a variant of <a href="https://proceedings.neurips.cc/paper_files/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf">AlexNet</a>, have gained recognition for their use in training and fine-tuning art classification models. This strategy of leveraging the features captured by a pre-existing model to accelerate the development of a new model for a different task is referred to as transfer learning. Transfer learning becomes particularly beneficial when we consider that the performance of art classification models is hampered by the much smaller size of digital art collections they are trained on, compared to larger datasets like ImageNet.</p><p>Among the various studies, a study by <a href="https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0248414">Zhao et al (2021)</a> stands out. Their findings suggest that models pre-trained on ImageNet yield the most favorable effects for art classification. Notably, EfficientNet emerged as a high-performer in the artist and genre classification tasks. Their results revealed clear differentiation in styles like Abstract Expressionism, but overlapping in styles like Baroque, Realism, and Romanticism often confused the model. And even though abstract, landscape and portrait genres were easily recognized, the model struggled with nude paintings.</p><p>Driven by curiosity, I sought to reproduce the scholars’ experiment using the WikiArts dataset, specifically focusing on the artist classification task. Introduced by <a href="https://arxiv.org/pdf/1505.00855.pdf">Saleh &amp; Elgammal</a> in 2015, the WikiArts dataset has since become a foundational resource in art classification research. This publicly accessible dataset collection houses 81,449 fine-art paintings from over a thousand artists, spanning fifteen centuries. While it pales in scale compared to the behemoth ImageNet, it’s a treasure among the few freely available digital art collections. Within the WikiArts dataset, three distinct hand-labeled subsets are dedicated to the artist, style and genre classification tasks, each of which are split into distinct training and test datasets.</p><h3>Pre-Training on ImageNet</h3><p>Borrowing from the methods employed by <a href="https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0248414">Zhao et al (2021)</a>, I monitored the model performance across each epoch, culminating in an accuracy assessment after 160 epochs. Following the authors, I, too, opted for EfficientNet_B3. Each model was fine-tuned using Adam, complemented by L2 regularization. Adopting their augmentation techniques, I applied RandomResizedCrop, RandomHorizontalFlip, and converted the Python import library (PIL) images into tensors. During training, I found that the EfficientNet_B3 for artist classification showcased an impressive 92.1% accuracy during training. However, this dropped to 81.8% on the the test set.</p><p>By examining the top nine paintings with the highest losses, it became evident that the model struggled with paintings featuring certain figurative elements such as flowers, trees, and landscapes. This observation suggests that if one or more artists predominantly paint such figures, their presence in a painting would skew the model’s inference arbitrarily towards those artists.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kt4rXMYbpvwanyjIe3v1fQ.png" /><figcaption>Top nine losses for the EfficientNet_B3 artist classification model pre-trained on ImageNet. Artist to the left of the slash symbol is the predicted artist, artist to the right of the slash is the actual artist.</figcaption></figure><p>Reviewing the confusion matrix and the t-SNE cluster map displayed below, provides a broader perspective on the model’s challenges. For instance, it is not surprising that artists such as Degas and Renoir are sometimes conflated given that both were seminal figures emblematic of the Impressionist movement. Likewise, the confusion between Hassan, Monet and Pissarro is likely rooted in their shared association with Impressionism. However, other misclassifications were less intuitive. For example, the model confuses Dali’s works for Picasso’s and Roerich’s, perhaps reflecting the influence that Dali drew from both Cubism and Symbolism. Interestingly, Ilya Repin’s works are not only mistaken for his realist contemporary, Boris Kustodiev, but also for Sargent (an American Impressionist and Realist) or even Rembrandt (a Dutch Master of the High Renaissance/Baroque period).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i0zkiwQ51g0EhRDi_opIpg.png" /><figcaption>Original EfficientNet pre-trained on ImageNet. Paintings projected in WikiArt using t-SNE. Each point is a painting, the coloring is mapped to the artists.</figcaption></figure><p>These cross-style confusions sparked a hypothesis: could the model’s accuracy benefit from transferring the learned features and weights of the style classification model to the artist classification model? Potentially, such a transfer could direct the model’s focus away from overt figurative elements and towards more nuanced, small-scale stylistic details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*PCjJUJ7zenGILJvE-4pOaw.png" /><figcaption>Confusion matrix of the original artist classification EfficientNet_B3 model pre-trained on ImageNet.</figcaption></figure><h3>Pre-Training on Style Classification</h3><p>An EfficientNet_B3 model was initially trained for style classification using the same approach as the original art classification model, achieving a peak training accuracy of 89.4%. To leverage transfer learning, the body of this style model was detached from its original head and coupled to a new, untrained head tailored for the artist classification task. This new integrated model, with its foundation pre-trained on the style classification task, was then subjected to the previously described training process. Remarkably, it reached a peak training accuracy of 97.4%. On evaluation, the test accuracy was 90.4%, marking an 8.6% enhancement compared to the original artist classification model.</p><p>After pre-training on style classification, the paintings with top losses now showcase a more diverse array of figurative content. The confusion matrix has fewer trouble spots, and a side-by-side comparison of the cluster maps of the two models illustrates a sharper differentiation among the artists. One persistent challenge is the overlapping recognition between Picasso and Dali, visible as neon green and brown clusters in the t-SNE visualization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Eo_hv7KOkrP2ozgTK3W6-A.png" /><figcaption>New EfficientNet model pre-trained on style classification. Paintings projected in WikiArt using t-SNE. Each point is a painting, the coloring is mapped to the artists.</figcaption></figure><p>Reviewing the paintings with top losses, the model’s confusion appears to be equally rooted in stylistic nuances and figurative content. For instance, Cézanne’s “Kiss of the Muse”, a Romantic reproduction of a Neoclassical masterpiece by Felix Frillié, is mistakenly attributed to Dali, perhaps due to the latter’s affinity for both styles. Further perplexities arise with pieces like Dali’s “The Unicorn (Unfinished)” where echoes of Degas’ equestrian portfolio may merge with Dali’s own unique use of media — charcoal, pastel, and oil — reminiscent of Degas.</p><p>In some cases, the stylistic overlaps are more predictable. Kustodiev’s “A Girl. Sketch,” drenched in the the influence of Ilya Repin, lends itself to misattribution, particularly when considered alongside Repin’s “Portrait of Nadya Repina.” Similarly, Sargent’s tranquil mountain tableau in “Engelsburg” closely resembles the realist landscapes characteristic of Shishkin, making the misclassification unsurprising. Furthermore, the misattribution of Monet’s “Fog” as Pissarro is likely due to both artists’ association with the Impressionist movement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nQvc9RPjvG1ichp_hfj4EQ.png" /><figcaption>Top nine losses for the EfficientNet_B3 artist classification model pre-trained on style classification. Artist to the left of the slash symbol is the predicted artist, artist to the right of the slash is the actual artist.</figcaption></figure><p>Yet, landscapes and outdoor motifs continue to be the model’s primary stumbling blocks. Pissarro’s “Peasants in the Field,” is wrongly attributed to Ivan Aivazovsky; a notable discrepancy given that, while the former may evoke memories of a work such as Aivazovsky’s “Sunset in Little Russia,” the quintessential distinctions between the Romantic and Impressionistic elements in Aivazovsky’s and Pissarro’s works, respectively, becomes overshadowed by the presence of a landscape in Pissarro’s piece. Similarly, Roerich’s “Ivan the Forester”, with its dense forested backdrop, is mistaken for one of Repin’s creations. That Pissarro’s “Le Grand Noyer au printemps” is mistaken for a work by Roerich further exemplifies this issue. This prediction seems to ignore the fact that Pissarro’s fragmentary oil technique is starkly contrasted with Roerich’s use of defined borders and wet temper pigments. However, some of these misidentifications, like Pissarro’s “Pea Harvest” being a work of Dali, may be due to genuine stylistic parallels given that the piece does bear resemblance to Dali’s 1920s landscapes such as “Olive Trees. Landscape at Cadaques” or “The Vegetable Garden of Llaner”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*geJKWQKIoBZ9yCzKUorvPg.png" /><figcaption>Confusion matrix for the model pre-trained on the style classification task.</figcaption></figure><h3>Conclusion</h3><p>The improvements I’ve made to the artist classification model show promise for deployment in recommendation systems assisting users in identifying artworks similar to a particular painting, much like the system tested by <a href="https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0248414">Zhao et el</a> in 2021. In future iterations, the accuracy of the model may be further improved by accounting for the variance of style across art historical periods, taking inspiration from <a href="https://arxiv.org/pdf/1801.07729.pdf">Elgammal et al 2018</a>. This could be pivotal in distinguishing the works of later painters like Dali from those of Cézanne or Pissarro.</p><p>Nevertheless, given the sporadic misattributions we’ve discussed, it would be essential for users to comprehend the logic underlying each recommendation. To wit, a deeper dive into the model’s internal workings could be pursued using a combination of visual approaches such as activation, filter and feature visualizations, class activation maps, and saliency maps. Moreover, analytic techniques such as SHAP could provide more interpretable insights into the model’s decision-making. Unpacking these visual and analytic techniques will be crucial for identifying the specific features and layers that predominantly shape the model’s predictions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64d2fec69b8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>