Welcome to the Art Style Detection project repository! This project focuses on detecting art styles from images using machine learning techniques. We utilize web scraping, preprocessing, and various classification models to achieve accurate classification of art styles.
- Introduction
- Data Collection
- Preprocessing
- Classification Models
- About the Data
- Installation
- Usage
- Contributing
- License
Art style detection involves identifying the artistic style of a given artwork, which can be a challenging task due to the diverse and subjective nature of art. This project aims to automate this process using machine learning algorithms. We scrape images from WikiArt.org, preprocess them, and train classification models to accurately predict the art style of the images.
We collect images from WikiArt.org using web scraping techniques implemented with BeautifulSoup and Selenium. The images are categorized into three art styles: Cubism, Impressionism, and Surrealism. In total, we scrape around 5000 images for our dataset.
Before training our models, we preprocess the images to enhance features and reduce noise. This involves applying filters and color palettes to standardize the appearance of the images across different styles. Preprocessing helps improve the performance of our classification models by making the features more discernible.
We experiment with two different classification models: Support Vector Machine (SVM) and Convolutional Neural Network (CNN). These models are trained on the preprocessed image data to learn the distinctive features of each art style. We evaluate the performance of each model and select the best-performing model for art style detection.
Our dataset comprises approximately 5000 images categorized into three art styles: Cubism, Impressionism, and Surrealism. Each image is labeled with its corresponding art style, allowing our classification models to learn and differentiate between the styles during training.
To set up the environment for running this project, follow these steps:
- Clone the repository:
git clone https://github.com/yourusername/art-style-detection.git
- Navigate to the project directory:
cd art-style-detection
- Install the required dependencies:
pip install -r requirements.txt
- Data Preparation: Ensure that you have the necessary datasets containing images of Cubism, Impressionism, and Surrealism artworks.
- Data Scraping: Use the provided scripts to scrape images from WikiArt.org or prepare your own dataset.
- Preprocessing: Apply filters and color palettes to preprocess the images for better feature extraction.
- Model Training: Train the SVM and CNN models on the preprocessed image data.
- Evaluation: Evaluate the performance of the trained models using validation or test datasets.
- Art Style Detection: Use the trained model to predict the art style of new images.
Contributions to this project are welcomed and appreciated. If you have any suggestions, feature requests, or bug reports, please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.