https://github.com/vriesdejelmer/colorCategories
Raw File
Tip revision: b3aa5823d5cb7d04f85e09248bdefeecb5badf84 authored by Jelmer de Vries on 30 November 2022, 16:46:44 UTC
Merge branch 'main' of https://github.com/vriesdejelmer/colorCategories
Tip revision: b3aa582
README.md
## ColorCategories

The code in this repository analyzes the representation of colors in a CNN (resnet) pretrained on ImageNet.
The general purpose of it is for review, replication or general re-use.

Folder structure:

General analysis is placed in the subfolder for ***analysis***, here one finds:
- *invariant_border_finder.py* takes pretrained networks, replaces the final layer and trains on colored word stimuli
- *genetic_border_finder.py* takes initializes sets of borders, evaluate how well these borders fit the network, and updates to obtain the best borders over several generations

The ***data*** folder holds the structure for the data: Please note that the data folders are mostly empty it does not fit due to GitHubs data constraints.
In principal the data files can be regenerated by running the code from scratch, however, if this is your purpose you can also contact me at: vriesdejelmer@gmail.com and I can provide you the data.

The ***generalModules*** subfolder contains functions and classes for
- Torch DataLoaders
- Generation of colored word and colored object stimuli
- Initializing and training models
- Evaluating models on color classification
- Code to create genetic offspring

The ***figureGeneration*** subfolder contains code to generate figures that acompany the manuscript.

The ***models*** subfolder contains specific pretrained networks.

Feel free to ask me questions at: *vriesdejelmer@gmail.com*
back to top