Stylized-ImageNet Project Overview
Stylized-ImageNet is an innovative project that enhances the traditional ImageNet dataset by adding artistic stylizations, which shifts convolutional neural networks (CNNs) to focus more on shapes rather than textures. This approach, as explored in the research paper by Robert Geirhos and colleagues, suggests that CNNs initially trained on ImageNet tend to have a texture bias, and altering this bias towards shapes can improve model accuracy and robustness.
Features and Goals
The primary aim of Stylized-ImageNet is to alter the biases in CNNs, encouraging them to recognize global shapes instead of local textures. This shift can heighten a model's performance when encountering variations in input data, such as those found in real-world applications.
Example Images
Stylized-ImageNet offers a visual transformation of ImageNet images. The local textures are significantly modified, whereas the overarching shapes of the objects are maintained. This transformation helps CNNs learn to identify objects based on shape cues rather than texture patterns.
How to Use Stylized-ImageNet
- Get Style Images: Start by downloading style images from the Kaggle's painter-by-numbers dataset.
- Prepare ImageNet Data: Acquire ImageNet images and set the
IMAGENET_PATH
in the project settings. You’ll need to also designate a path for theSTYLIZED_IMAGENET_PATH
to store the processed data. - Create Dataset: Use the provided script to stylize the ImageNet images. The script requires GPU access and can be run within a Docker container for ease of setup.
- Clean Up: Post-process cleanup involves deleting unnecessary directories to conserve storage.
Docker Support
For user convenience, a Docker image is available that bundles the necessary libraries, facilitating a hassle-free setup and execution environment, tested primarily with bethgelab/deeplearning:cuda9.0-cudnn7
.
Pre-trained CNNs
The project also offers pre-trained CNN models on Stylized-ImageNet, useful for researchers and developers who wish to explore the benefits of shape bias without creating the dataset from scratch.
Training Details
When training models on Stylized-ImageNet, the same normalization parameters (mean and standard deviation) used for ImageNet are applied, maintaining consistency across both datasets.
Stylizing Other Datasets
For those interested in applying a similar styling process to other datasets, the repository offers guidance and tools to achieve this, ensuring flexibility and adaptability for diverse research needs.
Access and Availability
Direct sharing of the Stylized-ImageNet dataset is not possible. However, users can create the dataset by following the project instructions, connect with others who have, or utilize a compressed 16-class version available through related resources.
Credits and Acknowledgments
The implementation of Stylized-ImageNet is built upon the PyTorch AdaIN (Adaptive Instance Normalization) approach proposed by X. Huang and S. Belongie. The project greatly benefits from this prior work, integrating style transfer processes seamlessly into its workflow.
For more details or to cite this work, refer to the publication by Robert Geirhos and colleagues in the International Conference on Learning Representations 2019.
Conclusion
The Stylized-ImageNet project provides a robust platform for research into shape bias in CNNs, offering tools, datasets, and resources necessary to advance understanding and application in real-world contexts.