Welcome to Artify, where Convolutional Neural Networks (CNNs) bring the genius of art to life! 🧑🎨✨ Can AI tell the difference between Picasso's bold geometry and and Dalí's surreal dreamscapes? Spoiler alert: it absolutely can!
This project trains a CNN to dive deep into the textures, colors, and brushwork of famous paintings, unraveling the secrets of each artist’s unique style. Forget genres—this is pure artistic detective work powered by cutting-edge machine learning.
Ready to let AI channel its inner art historian? Let’s create something extraordinary! 🚀
We fine-tuned several pre-trained Convolutional Neural Network (CNN) models (resnet18, densenet121) to classify paintings based on their painters. This project does not involve genre classification and exclusively focuses on the identification of the painter. We used a dataset of paintings of 7 painters (Claude Monet, Georges Braque, Pablo Picasso, Paul Cezanne, Pierre-August Renoir, Salvador Dalí, Vincent Van Gogh) and hence our model can only provide more accurate results for the paintings of these particular painters. We created an application Artify_App based on our best performing model.
The dataset comprises a collection of paintings by notable artists across different art movements. Each image is labeled with the painter's name, forming the basis for the supervised learning model. We downloaded the data from: https://www.kaggle.com/datasets/antoinegruson/-wikiart-all-images-120k-link
-
Duplicated paintings were erased from the dataset
-
Standardizing image dimensions through resizing
-
Normalizing pixel values for consistent model input
-
Splitting the dataset into training, validation, and test subsets
-
On the training set: normalization, augmentation (e.g., random crops, flips, and rotations), resize
-
On the test and validation sets: normalization and resize
torch, torchvision, streamlit, pillow, tqdm, scikit-learn, pandas, numpy, matplotlib
-
ResNet18
-
DenseNet121
We also built an application published on HuggingFace using our finetuned resnet18 model and using streamlit. Here is the screenshot of the application and the link: Artify_App
![application_screenshot](https://private-user-images.githubusercontent.com/70734093/390872069-be71c59b-466b-4d62-8452-67ad249db6cf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NjY3ODcsIm5iZiI6MTczOTU2NjQ4NywicGF0aCI6Ii83MDczNDA5My8zOTA4NzIwNjktYmU3MWM1OWItNDY2Yi00ZDYyLTg0NTItNjdhZDI0OWRiNmNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDIwNTQ0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ4OTIyOGMyMThjOTUxZWY2MDdlZTA3YTU5NDk0YjkzZWU5MTQwMTYxOWM5NjM2NWI3YTJlNDQzOWM4OGE5MmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Op7PbknQ3Ya_2o4BXofchYJD4h186hTIkjKlWB1OKaw)