From 5246315a0c04eb797a49bdc93ca31644902203bb Mon Sep 17 00:00:00 2001 From: Katherine Fairchild Date: Thu, 14 Nov 2024 20:20:41 -0500 Subject: [PATCH 1/8] brain-score.org submission (user:413) | (public:False) (#1072) * add yudixie_resnet18_240719_3 to models * Add yudixie_resnet18_distance_translation_0_240719.json to region_layer_map for model yudixie_resnet18_distance_translation_0_240719 --------- Co-authored-by: AutoJenkins Co-authored-by: Kartik Pradeepan Co-authored-by: KartikP --- .../yudixie_resnet18_240719_3/__init__.py | 11 ++++ .../models/yudixie_resnet18_240719_3/model.py | 60 +++++++++++++++++++ ...esnet18_distance_translation_0_240719.json | 6 ++ .../models/yudixie_resnet18_240719_3/setup.py | 25 ++++++++ .../models/yudixie_resnet18_240719_3/test.py | 1 + 5 files changed, 103 insertions(+) create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_3/__init__.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_3/model.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_3/region_layer_map/yudixie_resnet18_distance_translation_0_240719.json create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_3/setup.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_3/test.py diff --git a/brainscore_vision/models/yudixie_resnet18_240719_3/__init__.py b/brainscore_vision/models/yudixie_resnet18_240719_3/__init__.py new file mode 100644 index 000000000..1c66dfcca --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_3/__init__.py @@ -0,0 +1,11 @@ +from brainscore_vision import model_registry +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from .model import get_model, get_layers + + +def commit_model(identifier): + return ModelCommitment(identifier=identifier, + activations_model=get_model(identifier), + layers=get_layers(identifier)) + +model_registry['yudixie_resnet18_distance_translation_0_240719'] = lambda: commit_model('yudixie_resnet18_distance_translation_0_240719') diff --git a/brainscore_vision/models/yudixie_resnet18_240719_3/model.py b/brainscore_vision/models/yudixie_resnet18_240719_3/model.py new file mode 100644 index 000000000..a51012790 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_3/model.py @@ -0,0 +1,60 @@ +import os +from pathlib import Path +import functools +from urllib.request import urlretrieve + +import numpy as np +import torch +import torch.nn as nn +from torchvision.models import resnet18 + +from brainscore_vision.model_helpers.check_submission import check_models +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper, load_preprocess_images + + +# Please load your pytorch model for usage in CPU. There won't be GPUs available for scoring your model. +# If the model requires a GPU, contact the brain-score team directly. + + +def get_model(name): + pytorch_device = torch.device('cpu') + + weigth_url = f'https://yudi-brainscore-models.s3.amazonaws.com/{name}.pth' + fh = urlretrieve(weigth_url, f'{name}_weights.pth') + load_path = fh[0] + + pytorch_model = resnet18() + pytorch_model.fc = nn.Linear(pytorch_model.fc.in_features, 674) + pytorch_model = pytorch_model.to(pytorch_device) + + # load model from saved weights + saved_state_dict = torch.load(load_path, map_location=pytorch_device) + state_dict = {} + for k, v in saved_state_dict.items(): + if k.startswith('_orig_mod.'): + # for compiled models + state_dict[k[10:]] = v + else: + state_dict[k] = v + pytorch_model.load_state_dict(state_dict, strict=True) + print(f'Loaded model from {load_path}') + + preprocessing = functools.partial(load_preprocess_images, image_size=224) + wrapper = PytorchWrapper(identifier=name, + model=pytorch_model, + preprocessing=preprocessing) + wrapper.image_size = 224 + return wrapper + + +def get_layers(name): + return ['conv1','layer1', 'layer2', 'layer3', 'layer4', 'fc'] + + +def get_bibtex(model_identifier): + return """xx""" + + +if __name__ == '__main__': + check_models.check_base_models(__name__) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_3/region_layer_map/yudixie_resnet18_distance_translation_0_240719.json b/brainscore_vision/models/yudixie_resnet18_240719_3/region_layer_map/yudixie_resnet18_distance_translation_0_240719.json new file mode 100644 index 000000000..b0dc35563 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_3/region_layer_map/yudixie_resnet18_distance_translation_0_240719.json @@ -0,0 +1,6 @@ +{ + "V1": "layer1", + "V2": "layer2", + "V4": "layer1", + "IT": "layer3" +} \ No newline at end of file diff --git a/brainscore_vision/models/yudixie_resnet18_240719_3/setup.py b/brainscore_vision/models/yudixie_resnet18_240719_3/setup.py new file mode 100644 index 000000000..421914cfb --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_3/setup.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from setuptools import setup, find_packages + +requirements = [ "torchvision", + "torch" +] + +setup( + packages=find_packages(exclude=['tests']), + include_package_data=True, + install_requires=requirements, + license="MIT license", + zip_safe=False, + keywords='brain-score template', + classifiers=[ + 'Development Status :: 2 - Pre-Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Programming Language :: Python :: 3.7', + ], + test_suite='tests', +) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_3/test.py b/brainscore_vision/models/yudixie_resnet18_240719_3/test.py new file mode 100644 index 000000000..e594ba9e1 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_3/test.py @@ -0,0 +1 @@ +# Left empty as part of 2023 models migration From 32b8a58054598c71417ca1ef8136889027d12aaf Mon Sep 17 00:00:00 2001 From: Katherine Fairchild Date: Thu, 14 Nov 2024 20:45:05 -0500 Subject: [PATCH 2/8] brain-score.org submission (user:413) | (public:False) (#1073) * add yudixie_resnet18_240719_4 to models * Add yudixie_resnet18_distance_rotation_0_240719.json to region_layer_map for model yudixie_resnet18_distance_rotation_0_240719 --------- Co-authored-by: AutoJenkins Co-authored-by: Kartik Pradeepan Co-authored-by: KartikP --- .../yudixie_resnet18_240719_4/__init__.py | 12 ++++ .../models/yudixie_resnet18_240719_4/model.py | 60 +++++++++++++++++++ ...e_resnet18_distance_rotation_0_240719.json | 6 ++ .../models/yudixie_resnet18_240719_4/setup.py | 25 ++++++++ .../models/yudixie_resnet18_240719_4/test.py | 1 + 5 files changed, 104 insertions(+) create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_4/__init__.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_4/model.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_4/region_layer_map/yudixie_resnet18_distance_rotation_0_240719.json create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_4/setup.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_4/test.py diff --git a/brainscore_vision/models/yudixie_resnet18_240719_4/__init__.py b/brainscore_vision/models/yudixie_resnet18_240719_4/__init__.py new file mode 100644 index 000000000..9613b7fa1 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_4/__init__.py @@ -0,0 +1,12 @@ +from brainscore_vision import model_registry +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from .model import get_model, get_layers + + +def commit_model(identifier): + return ModelCommitment(identifier=identifier, + activations_model=get_model(identifier), + layers=get_layers(identifier)) + + +model_registry['yudixie_resnet18_distance_rotation_0_240719'] = lambda: commit_model('yudixie_resnet18_distance_rotation_0_240719') diff --git a/brainscore_vision/models/yudixie_resnet18_240719_4/model.py b/brainscore_vision/models/yudixie_resnet18_240719_4/model.py new file mode 100644 index 000000000..a51012790 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_4/model.py @@ -0,0 +1,60 @@ +import os +from pathlib import Path +import functools +from urllib.request import urlretrieve + +import numpy as np +import torch +import torch.nn as nn +from torchvision.models import resnet18 + +from brainscore_vision.model_helpers.check_submission import check_models +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper, load_preprocess_images + + +# Please load your pytorch model for usage in CPU. There won't be GPUs available for scoring your model. +# If the model requires a GPU, contact the brain-score team directly. + + +def get_model(name): + pytorch_device = torch.device('cpu') + + weigth_url = f'https://yudi-brainscore-models.s3.amazonaws.com/{name}.pth' + fh = urlretrieve(weigth_url, f'{name}_weights.pth') + load_path = fh[0] + + pytorch_model = resnet18() + pytorch_model.fc = nn.Linear(pytorch_model.fc.in_features, 674) + pytorch_model = pytorch_model.to(pytorch_device) + + # load model from saved weights + saved_state_dict = torch.load(load_path, map_location=pytorch_device) + state_dict = {} + for k, v in saved_state_dict.items(): + if k.startswith('_orig_mod.'): + # for compiled models + state_dict[k[10:]] = v + else: + state_dict[k] = v + pytorch_model.load_state_dict(state_dict, strict=True) + print(f'Loaded model from {load_path}') + + preprocessing = functools.partial(load_preprocess_images, image_size=224) + wrapper = PytorchWrapper(identifier=name, + model=pytorch_model, + preprocessing=preprocessing) + wrapper.image_size = 224 + return wrapper + + +def get_layers(name): + return ['conv1','layer1', 'layer2', 'layer3', 'layer4', 'fc'] + + +def get_bibtex(model_identifier): + return """xx""" + + +if __name__ == '__main__': + check_models.check_base_models(__name__) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_4/region_layer_map/yudixie_resnet18_distance_rotation_0_240719.json b/brainscore_vision/models/yudixie_resnet18_240719_4/region_layer_map/yudixie_resnet18_distance_rotation_0_240719.json new file mode 100644 index 000000000..ae0c4006f --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_4/region_layer_map/yudixie_resnet18_distance_rotation_0_240719.json @@ -0,0 +1,6 @@ +{ + "V1": "layer1", + "V2": "layer1", + "V4": "layer1", + "IT": "layer3" +} \ No newline at end of file diff --git a/brainscore_vision/models/yudixie_resnet18_240719_4/setup.py b/brainscore_vision/models/yudixie_resnet18_240719_4/setup.py new file mode 100644 index 000000000..421914cfb --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_4/setup.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from setuptools import setup, find_packages + +requirements = [ "torchvision", + "torch" +] + +setup( + packages=find_packages(exclude=['tests']), + include_package_data=True, + install_requires=requirements, + license="MIT license", + zip_safe=False, + keywords='brain-score template', + classifiers=[ + 'Development Status :: 2 - Pre-Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Programming Language :: Python :: 3.7', + ], + test_suite='tests', +) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_4/test.py b/brainscore_vision/models/yudixie_resnet18_240719_4/test.py new file mode 100644 index 000000000..e594ba9e1 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_4/test.py @@ -0,0 +1 @@ +# Left empty as part of 2023 models migration From c543d7eb03ff3f179b30f2d545d70139307c8976 Mon Sep 17 00:00:00 2001 From: Katherine Fairchild Date: Thu, 14 Nov 2024 20:46:48 -0500 Subject: [PATCH 3/8] brain-score.org submission (user:413) | (public:False) (#1074) * add yudixie_resnet18_240719_5 to models * Add yudixie_resnet18_translation_rotation_0_240719.json to region_layer_map for model yudixie_resnet18_translation_rotation_0_240719 --------- Co-authored-by: AutoJenkins Co-authored-by: Kartik Pradeepan Co-authored-by: KartikP --- .../yudixie_resnet18_240719_5/__init__.py | 13 ++++ .../models/yudixie_resnet18_240719_5/model.py | 60 +++++++++++++++++++ ...esnet18_translation_rotation_0_240719.json | 6 ++ .../models/yudixie_resnet18_240719_5/setup.py | 25 ++++++++ .../models/yudixie_resnet18_240719_5/test.py | 1 + 5 files changed, 105 insertions(+) create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_5/__init__.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_5/model.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_5/region_layer_map/yudixie_resnet18_translation_rotation_0_240719.json create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_5/setup.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_5/test.py diff --git a/brainscore_vision/models/yudixie_resnet18_240719_5/__init__.py b/brainscore_vision/models/yudixie_resnet18_240719_5/__init__.py new file mode 100644 index 000000000..88f40f3a3 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_5/__init__.py @@ -0,0 +1,13 @@ +from brainscore_vision import model_registry +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from .model import get_model, get_layers + + +def commit_model(identifier): + return ModelCommitment(identifier=identifier, + activations_model=get_model(identifier), + layers=get_layers(identifier)) + + +model_registry['yudixie_resnet18_translation_rotation_0_240719'] = lambda: commit_model('yudixie_resnet18_translation_rotation_0_240719') + diff --git a/brainscore_vision/models/yudixie_resnet18_240719_5/model.py b/brainscore_vision/models/yudixie_resnet18_240719_5/model.py new file mode 100644 index 000000000..a51012790 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_5/model.py @@ -0,0 +1,60 @@ +import os +from pathlib import Path +import functools +from urllib.request import urlretrieve + +import numpy as np +import torch +import torch.nn as nn +from torchvision.models import resnet18 + +from brainscore_vision.model_helpers.check_submission import check_models +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper, load_preprocess_images + + +# Please load your pytorch model for usage in CPU. There won't be GPUs available for scoring your model. +# If the model requires a GPU, contact the brain-score team directly. + + +def get_model(name): + pytorch_device = torch.device('cpu') + + weigth_url = f'https://yudi-brainscore-models.s3.amazonaws.com/{name}.pth' + fh = urlretrieve(weigth_url, f'{name}_weights.pth') + load_path = fh[0] + + pytorch_model = resnet18() + pytorch_model.fc = nn.Linear(pytorch_model.fc.in_features, 674) + pytorch_model = pytorch_model.to(pytorch_device) + + # load model from saved weights + saved_state_dict = torch.load(load_path, map_location=pytorch_device) + state_dict = {} + for k, v in saved_state_dict.items(): + if k.startswith('_orig_mod.'): + # for compiled models + state_dict[k[10:]] = v + else: + state_dict[k] = v + pytorch_model.load_state_dict(state_dict, strict=True) + print(f'Loaded model from {load_path}') + + preprocessing = functools.partial(load_preprocess_images, image_size=224) + wrapper = PytorchWrapper(identifier=name, + model=pytorch_model, + preprocessing=preprocessing) + wrapper.image_size = 224 + return wrapper + + +def get_layers(name): + return ['conv1','layer1', 'layer2', 'layer3', 'layer4', 'fc'] + + +def get_bibtex(model_identifier): + return """xx""" + + +if __name__ == '__main__': + check_models.check_base_models(__name__) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_5/region_layer_map/yudixie_resnet18_translation_rotation_0_240719.json b/brainscore_vision/models/yudixie_resnet18_240719_5/region_layer_map/yudixie_resnet18_translation_rotation_0_240719.json new file mode 100644 index 000000000..b0dc35563 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_5/region_layer_map/yudixie_resnet18_translation_rotation_0_240719.json @@ -0,0 +1,6 @@ +{ + "V1": "layer1", + "V2": "layer2", + "V4": "layer1", + "IT": "layer3" +} \ No newline at end of file diff --git a/brainscore_vision/models/yudixie_resnet18_240719_5/setup.py b/brainscore_vision/models/yudixie_resnet18_240719_5/setup.py new file mode 100644 index 000000000..421914cfb --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_5/setup.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from setuptools import setup, find_packages + +requirements = [ "torchvision", + "torch" +] + +setup( + packages=find_packages(exclude=['tests']), + include_package_data=True, + install_requires=requirements, + license="MIT license", + zip_safe=False, + keywords='brain-score template', + classifiers=[ + 'Development Status :: 2 - Pre-Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Programming Language :: Python :: 3.7', + ], + test_suite='tests', +) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_5/test.py b/brainscore_vision/models/yudixie_resnet18_240719_5/test.py new file mode 100644 index 000000000..e594ba9e1 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_5/test.py @@ -0,0 +1 @@ +# Left empty as part of 2023 models migration From 03ed38b8598e75c0083fc23a34ff3fc0cd04fad1 Mon Sep 17 00:00:00 2001 From: Katherine Fairchild Date: Thu, 14 Nov 2024 20:54:52 -0500 Subject: [PATCH 4/8] brain-score.org submission (user:413) | (public:False) (#1076) * add yudixie_resnet18_240719_7 to models * Add yudixie_resnet18_category_class_0_240719.json to region_layer_map for model yudixie_resnet18_category_class_0_240719 --------- Co-authored-by: AutoJenkins Co-authored-by: Kartik Pradeepan Co-authored-by: KartikP --- .../yudixie_resnet18_240719_7/__init__.py | 11 ++++ .../models/yudixie_resnet18_240719_7/model.py | 60 +++++++++++++++++++ ...ixie_resnet18_category_class_0_240719.json | 6 ++ .../models/yudixie_resnet18_240719_7/setup.py | 25 ++++++++ .../models/yudixie_resnet18_240719_7/test.py | 1 + 5 files changed, 103 insertions(+) create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_7/__init__.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_7/model.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_7/region_layer_map/yudixie_resnet18_category_class_0_240719.json create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_7/setup.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_7/test.py diff --git a/brainscore_vision/models/yudixie_resnet18_240719_7/__init__.py b/brainscore_vision/models/yudixie_resnet18_240719_7/__init__.py new file mode 100644 index 000000000..7db3a60dd --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_7/__init__.py @@ -0,0 +1,11 @@ +from brainscore_vision import model_registry +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from .model import get_model, get_layers + + +def commit_model(identifier): + return ModelCommitment(identifier=identifier, + activations_model=get_model(identifier), + layers=get_layers(identifier)) + +model_registry['yudixie_resnet18_category_class_0_240719'] = lambda: commit_model('yudixie_resnet18_category_class_0_240719') diff --git a/brainscore_vision/models/yudixie_resnet18_240719_7/model.py b/brainscore_vision/models/yudixie_resnet18_240719_7/model.py new file mode 100644 index 000000000..a51012790 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_7/model.py @@ -0,0 +1,60 @@ +import os +from pathlib import Path +import functools +from urllib.request import urlretrieve + +import numpy as np +import torch +import torch.nn as nn +from torchvision.models import resnet18 + +from brainscore_vision.model_helpers.check_submission import check_models +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper, load_preprocess_images + + +# Please load your pytorch model for usage in CPU. There won't be GPUs available for scoring your model. +# If the model requires a GPU, contact the brain-score team directly. + + +def get_model(name): + pytorch_device = torch.device('cpu') + + weigth_url = f'https://yudi-brainscore-models.s3.amazonaws.com/{name}.pth' + fh = urlretrieve(weigth_url, f'{name}_weights.pth') + load_path = fh[0] + + pytorch_model = resnet18() + pytorch_model.fc = nn.Linear(pytorch_model.fc.in_features, 674) + pytorch_model = pytorch_model.to(pytorch_device) + + # load model from saved weights + saved_state_dict = torch.load(load_path, map_location=pytorch_device) + state_dict = {} + for k, v in saved_state_dict.items(): + if k.startswith('_orig_mod.'): + # for compiled models + state_dict[k[10:]] = v + else: + state_dict[k] = v + pytorch_model.load_state_dict(state_dict, strict=True) + print(f'Loaded model from {load_path}') + + preprocessing = functools.partial(load_preprocess_images, image_size=224) + wrapper = PytorchWrapper(identifier=name, + model=pytorch_model, + preprocessing=preprocessing) + wrapper.image_size = 224 + return wrapper + + +def get_layers(name): + return ['conv1','layer1', 'layer2', 'layer3', 'layer4', 'fc'] + + +def get_bibtex(model_identifier): + return """xx""" + + +if __name__ == '__main__': + check_models.check_base_models(__name__) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_7/region_layer_map/yudixie_resnet18_category_class_0_240719.json b/brainscore_vision/models/yudixie_resnet18_240719_7/region_layer_map/yudixie_resnet18_category_class_0_240719.json new file mode 100644 index 000000000..33bc3f5c9 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_7/region_layer_map/yudixie_resnet18_category_class_0_240719.json @@ -0,0 +1,6 @@ +{ + "V1": "layer1", + "V2": "layer3", + "V4": "layer2", + "IT": "layer3" +} \ No newline at end of file diff --git a/brainscore_vision/models/yudixie_resnet18_240719_7/setup.py b/brainscore_vision/models/yudixie_resnet18_240719_7/setup.py new file mode 100644 index 000000000..421914cfb --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_7/setup.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from setuptools import setup, find_packages + +requirements = [ "torchvision", + "torch" +] + +setup( + packages=find_packages(exclude=['tests']), + include_package_data=True, + install_requires=requirements, + license="MIT license", + zip_safe=False, + keywords='brain-score template', + classifiers=[ + 'Development Status :: 2 - Pre-Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Programming Language :: Python :: 3.7', + ], + test_suite='tests', +) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_7/test.py b/brainscore_vision/models/yudixie_resnet18_240719_7/test.py new file mode 100644 index 000000000..e594ba9e1 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_7/test.py @@ -0,0 +1 @@ +# Left empty as part of 2023 models migration From bbca2f60b0ea0c36e21e0bf2f173632d243fa152 Mon Sep 17 00:00:00 2001 From: Katherine Fairchild Date: Thu, 14 Nov 2024 21:34:05 -0500 Subject: [PATCH 5/8] brain-score.org submission (user:413) | (public:False) (#1080) * add yudixie_resnet18_240719_11 to models * Add yudixie_resnet18_random_0_240719.json to region_layer_map for model yudixie_resnet18_random_0_240719 --------- Co-authored-by: AutoJenkins Co-authored-by: Kartik Pradeepan Co-authored-by: KartikP --- .../yudixie_resnet18_240719_11/__init__.py | 11 ++++ .../yudixie_resnet18_240719_11/model.py | 60 +++++++++++++++++++ .../yudixie_resnet18_random_0_240719.json | 6 ++ .../yudixie_resnet18_240719_11/setup.py | 25 ++++++++ .../models/yudixie_resnet18_240719_11/test.py | 1 + 5 files changed, 103 insertions(+) create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_11/__init__.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_11/model.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_11/region_layer_map/yudixie_resnet18_random_0_240719.json create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_11/setup.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_11/test.py diff --git a/brainscore_vision/models/yudixie_resnet18_240719_11/__init__.py b/brainscore_vision/models/yudixie_resnet18_240719_11/__init__.py new file mode 100644 index 000000000..c43cda5c1 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_11/__init__.py @@ -0,0 +1,11 @@ +from brainscore_vision import model_registry +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from .model import get_model, get_layers + + +def commit_model(identifier): + return ModelCommitment(identifier=identifier, + activations_model=get_model(identifier), + layers=get_layers(identifier)) + +model_registry['yudixie_resnet18_random_0_240719'] = lambda: commit_model('yudixie_resnet18_random_0_240719') diff --git a/brainscore_vision/models/yudixie_resnet18_240719_11/model.py b/brainscore_vision/models/yudixie_resnet18_240719_11/model.py new file mode 100644 index 000000000..a51012790 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_11/model.py @@ -0,0 +1,60 @@ +import os +from pathlib import Path +import functools +from urllib.request import urlretrieve + +import numpy as np +import torch +import torch.nn as nn +from torchvision.models import resnet18 + +from brainscore_vision.model_helpers.check_submission import check_models +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper, load_preprocess_images + + +# Please load your pytorch model for usage in CPU. There won't be GPUs available for scoring your model. +# If the model requires a GPU, contact the brain-score team directly. + + +def get_model(name): + pytorch_device = torch.device('cpu') + + weigth_url = f'https://yudi-brainscore-models.s3.amazonaws.com/{name}.pth' + fh = urlretrieve(weigth_url, f'{name}_weights.pth') + load_path = fh[0] + + pytorch_model = resnet18() + pytorch_model.fc = nn.Linear(pytorch_model.fc.in_features, 674) + pytorch_model = pytorch_model.to(pytorch_device) + + # load model from saved weights + saved_state_dict = torch.load(load_path, map_location=pytorch_device) + state_dict = {} + for k, v in saved_state_dict.items(): + if k.startswith('_orig_mod.'): + # for compiled models + state_dict[k[10:]] = v + else: + state_dict[k] = v + pytorch_model.load_state_dict(state_dict, strict=True) + print(f'Loaded model from {load_path}') + + preprocessing = functools.partial(load_preprocess_images, image_size=224) + wrapper = PytorchWrapper(identifier=name, + model=pytorch_model, + preprocessing=preprocessing) + wrapper.image_size = 224 + return wrapper + + +def get_layers(name): + return ['conv1','layer1', 'layer2', 'layer3', 'layer4', 'fc'] + + +def get_bibtex(model_identifier): + return """xx""" + + +if __name__ == '__main__': + check_models.check_base_models(__name__) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_11/region_layer_map/yudixie_resnet18_random_0_240719.json b/brainscore_vision/models/yudixie_resnet18_240719_11/region_layer_map/yudixie_resnet18_random_0_240719.json new file mode 100644 index 000000000..ea6efe83a --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_11/region_layer_map/yudixie_resnet18_random_0_240719.json @@ -0,0 +1,6 @@ +{ + "V1": "layer1", + "V2": "layer2", + "V4": "layer1", + "IT": "layer4" +} \ No newline at end of file diff --git a/brainscore_vision/models/yudixie_resnet18_240719_11/setup.py b/brainscore_vision/models/yudixie_resnet18_240719_11/setup.py new file mode 100644 index 000000000..421914cfb --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_11/setup.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from setuptools import setup, find_packages + +requirements = [ "torchvision", + "torch" +] + +setup( + packages=find_packages(exclude=['tests']), + include_package_data=True, + install_requires=requirements, + license="MIT license", + zip_safe=False, + keywords='brain-score template', + classifiers=[ + 'Development Status :: 2 - Pre-Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Programming Language :: Python :: 3.7', + ], + test_suite='tests', +) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_11/test.py b/brainscore_vision/models/yudixie_resnet18_240719_11/test.py new file mode 100644 index 000000000..e594ba9e1 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_11/test.py @@ -0,0 +1 @@ +# Left empty as part of 2023 models migration From d543308e58af74c07366bc0590c6e7957e40e769 Mon Sep 17 00:00:00 2001 From: Katherine Fairchild Date: Thu, 14 Nov 2024 21:34:33 -0500 Subject: [PATCH 6/8] brain-score.org submission (user:413) | (public:False) (#1078) * add yudixie_resnet18_240719_9 to models * Add yudixie_resnet18_cat_obj_class_all_latents_0_240719.json to region_layer_map for model yudixie_resnet18_cat_obj_class_all_latents_0_240719 --------- Co-authored-by: AutoJenkins Co-authored-by: Kartik Pradeepan Co-authored-by: KartikP --- .../yudixie_resnet18_240719_9/__init__.py | 11 ++++ .../models/yudixie_resnet18_240719_9/model.py | 60 +++++++++++++++++++ ...18_cat_obj_class_all_latents_0_240719.json | 6 ++ .../models/yudixie_resnet18_240719_9/setup.py | 25 ++++++++ .../models/yudixie_resnet18_240719_9/test.py | 1 + 5 files changed, 103 insertions(+) create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_9/__init__.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_9/model.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_9/region_layer_map/yudixie_resnet18_cat_obj_class_all_latents_0_240719.json create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_9/setup.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_9/test.py diff --git a/brainscore_vision/models/yudixie_resnet18_240719_9/__init__.py b/brainscore_vision/models/yudixie_resnet18_240719_9/__init__.py new file mode 100644 index 000000000..ab61249d5 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_9/__init__.py @@ -0,0 +1,11 @@ +from brainscore_vision import model_registry +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from .model import get_model, get_layers + + +def commit_model(identifier): + return ModelCommitment(identifier=identifier, + activations_model=get_model(identifier), + layers=get_layers(identifier)) + +model_registry['yudixie_resnet18_cat_obj_class_all_latents_0_240719'] = lambda: commit_model('yudixie_resnet18_cat_obj_class_all_latents_0_240719') diff --git a/brainscore_vision/models/yudixie_resnet18_240719_9/model.py b/brainscore_vision/models/yudixie_resnet18_240719_9/model.py new file mode 100644 index 000000000..a51012790 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_9/model.py @@ -0,0 +1,60 @@ +import os +from pathlib import Path +import functools +from urllib.request import urlretrieve + +import numpy as np +import torch +import torch.nn as nn +from torchvision.models import resnet18 + +from brainscore_vision.model_helpers.check_submission import check_models +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper, load_preprocess_images + + +# Please load your pytorch model for usage in CPU. There won't be GPUs available for scoring your model. +# If the model requires a GPU, contact the brain-score team directly. + + +def get_model(name): + pytorch_device = torch.device('cpu') + + weigth_url = f'https://yudi-brainscore-models.s3.amazonaws.com/{name}.pth' + fh = urlretrieve(weigth_url, f'{name}_weights.pth') + load_path = fh[0] + + pytorch_model = resnet18() + pytorch_model.fc = nn.Linear(pytorch_model.fc.in_features, 674) + pytorch_model = pytorch_model.to(pytorch_device) + + # load model from saved weights + saved_state_dict = torch.load(load_path, map_location=pytorch_device) + state_dict = {} + for k, v in saved_state_dict.items(): + if k.startswith('_orig_mod.'): + # for compiled models + state_dict[k[10:]] = v + else: + state_dict[k] = v + pytorch_model.load_state_dict(state_dict, strict=True) + print(f'Loaded model from {load_path}') + + preprocessing = functools.partial(load_preprocess_images, image_size=224) + wrapper = PytorchWrapper(identifier=name, + model=pytorch_model, + preprocessing=preprocessing) + wrapper.image_size = 224 + return wrapper + + +def get_layers(name): + return ['conv1','layer1', 'layer2', 'layer3', 'layer4', 'fc'] + + +def get_bibtex(model_identifier): + return """xx""" + + +if __name__ == '__main__': + check_models.check_base_models(__name__) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_9/region_layer_map/yudixie_resnet18_cat_obj_class_all_latents_0_240719.json b/brainscore_vision/models/yudixie_resnet18_240719_9/region_layer_map/yudixie_resnet18_cat_obj_class_all_latents_0_240719.json new file mode 100644 index 000000000..78c26021e --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_9/region_layer_map/yudixie_resnet18_cat_obj_class_all_latents_0_240719.json @@ -0,0 +1,6 @@ +{ + "V1": "layer1", + "V2": "layer2", + "V4": "layer2", + "IT": "layer3" +} \ No newline at end of file diff --git a/brainscore_vision/models/yudixie_resnet18_240719_9/setup.py b/brainscore_vision/models/yudixie_resnet18_240719_9/setup.py new file mode 100644 index 000000000..421914cfb --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_9/setup.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from setuptools import setup, find_packages + +requirements = [ "torchvision", + "torch" +] + +setup( + packages=find_packages(exclude=['tests']), + include_package_data=True, + install_requires=requirements, + license="MIT license", + zip_safe=False, + keywords='brain-score template', + classifiers=[ + 'Development Status :: 2 - Pre-Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Programming Language :: Python :: 3.7', + ], + test_suite='tests', +) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_9/test.py b/brainscore_vision/models/yudixie_resnet18_240719_9/test.py new file mode 100644 index 000000000..e594ba9e1 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_9/test.py @@ -0,0 +1 @@ +# Left empty as part of 2023 models migration From ab2e2ade7f918193e4939fb5a9616c354c5bd1ce Mon Sep 17 00:00:00 2001 From: Katherine Fairchild Date: Fri, 15 Nov 2024 05:11:05 -0500 Subject: [PATCH 7/8] brain-score.org submission (user:413) | (public:False) (#1077) * add yudixie_resnet18_240719_8 to models * Add yudixie_resnet18_object_class_0_240719.json to region_layer_map for model yudixie_resnet18_object_class_0_240719 --------- Co-authored-by: AutoJenkins Co-authored-by: Kartik Pradeepan Co-authored-by: KartikP --- .../yudixie_resnet18_240719_8/__init__.py | 11 ++++ .../models/yudixie_resnet18_240719_8/model.py | 60 +++++++++++++++++++ ...udixie_resnet18_object_class_0_240719.json | 6 ++ .../models/yudixie_resnet18_240719_8/setup.py | 25 ++++++++ .../models/yudixie_resnet18_240719_8/test.py | 1 + 5 files changed, 103 insertions(+) create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_8/__init__.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_8/model.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_8/region_layer_map/yudixie_resnet18_object_class_0_240719.json create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_8/setup.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_8/test.py diff --git a/brainscore_vision/models/yudixie_resnet18_240719_8/__init__.py b/brainscore_vision/models/yudixie_resnet18_240719_8/__init__.py new file mode 100644 index 000000000..5647e8f4f --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_8/__init__.py @@ -0,0 +1,11 @@ +from brainscore_vision import model_registry +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from .model import get_model, get_layers + + +def commit_model(identifier): + return ModelCommitment(identifier=identifier, + activations_model=get_model(identifier), + layers=get_layers(identifier)) + +model_registry['yudixie_resnet18_object_class_0_240719'] = lambda: commit_model('yudixie_resnet18_object_class_0_240719') diff --git a/brainscore_vision/models/yudixie_resnet18_240719_8/model.py b/brainscore_vision/models/yudixie_resnet18_240719_8/model.py new file mode 100644 index 000000000..a51012790 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_8/model.py @@ -0,0 +1,60 @@ +import os +from pathlib import Path +import functools +from urllib.request import urlretrieve + +import numpy as np +import torch +import torch.nn as nn +from torchvision.models import resnet18 + +from brainscore_vision.model_helpers.check_submission import check_models +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper, load_preprocess_images + + +# Please load your pytorch model for usage in CPU. There won't be GPUs available for scoring your model. +# If the model requires a GPU, contact the brain-score team directly. + + +def get_model(name): + pytorch_device = torch.device('cpu') + + weigth_url = f'https://yudi-brainscore-models.s3.amazonaws.com/{name}.pth' + fh = urlretrieve(weigth_url, f'{name}_weights.pth') + load_path = fh[0] + + pytorch_model = resnet18() + pytorch_model.fc = nn.Linear(pytorch_model.fc.in_features, 674) + pytorch_model = pytorch_model.to(pytorch_device) + + # load model from saved weights + saved_state_dict = torch.load(load_path, map_location=pytorch_device) + state_dict = {} + for k, v in saved_state_dict.items(): + if k.startswith('_orig_mod.'): + # for compiled models + state_dict[k[10:]] = v + else: + state_dict[k] = v + pytorch_model.load_state_dict(state_dict, strict=True) + print(f'Loaded model from {load_path}') + + preprocessing = functools.partial(load_preprocess_images, image_size=224) + wrapper = PytorchWrapper(identifier=name, + model=pytorch_model, + preprocessing=preprocessing) + wrapper.image_size = 224 + return wrapper + + +def get_layers(name): + return ['conv1','layer1', 'layer2', 'layer3', 'layer4', 'fc'] + + +def get_bibtex(model_identifier): + return """xx""" + + +if __name__ == '__main__': + check_models.check_base_models(__name__) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_8/region_layer_map/yudixie_resnet18_object_class_0_240719.json b/brainscore_vision/models/yudixie_resnet18_240719_8/region_layer_map/yudixie_resnet18_object_class_0_240719.json new file mode 100644 index 000000000..be832ff01 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_8/region_layer_map/yudixie_resnet18_object_class_0_240719.json @@ -0,0 +1,6 @@ +{ + "V1": "layer2", + "V2": "layer2", + "V4": "layer2", + "IT": "layer3" +} \ No newline at end of file diff --git a/brainscore_vision/models/yudixie_resnet18_240719_8/setup.py b/brainscore_vision/models/yudixie_resnet18_240719_8/setup.py new file mode 100644 index 000000000..421914cfb --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_8/setup.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from setuptools import setup, find_packages + +requirements = [ "torchvision", + "torch" +] + +setup( + packages=find_packages(exclude=['tests']), + include_package_data=True, + install_requires=requirements, + license="MIT license", + zip_safe=False, + keywords='brain-score template', + classifiers=[ + 'Development Status :: 2 - Pre-Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Programming Language :: Python :: 3.7', + ], + test_suite='tests', +) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_8/test.py b/brainscore_vision/models/yudixie_resnet18_240719_8/test.py new file mode 100644 index 000000000..e594ba9e1 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_8/test.py @@ -0,0 +1 @@ +# Left empty as part of 2023 models migration From 953cc954ec90f72e169a1fa00ed62fa6cc8c8a00 Mon Sep 17 00:00:00 2001 From: Katherine Fairchild Date: Fri, 15 Nov 2024 05:11:24 -0500 Subject: [PATCH 8/8] brain-score.org submission (user:413) | (public:False) (#1075) * add yudixie_resnet18_240719_6 to models * Add yudixie_resnet18_distance_translation_rotation_0_240719.json to region_layer_map for model yudixie_resnet18_distance_translation_rotation_0_240719 --------- Co-authored-by: AutoJenkins Co-authored-by: Kartik Pradeepan Co-authored-by: KartikP --- .../yudixie_resnet18_240719_6/__init__.py | 12 ++++ .../models/yudixie_resnet18_240719_6/model.py | 60 +++++++++++++++++++ ...istance_translation_rotation_0_240719.json | 6 ++ .../models/yudixie_resnet18_240719_6/setup.py | 25 ++++++++ .../models/yudixie_resnet18_240719_6/test.py | 1 + 5 files changed, 104 insertions(+) create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_6/__init__.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_6/model.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_6/region_layer_map/yudixie_resnet18_distance_translation_rotation_0_240719.json create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_6/setup.py create mode 100644 brainscore_vision/models/yudixie_resnet18_240719_6/test.py diff --git a/brainscore_vision/models/yudixie_resnet18_240719_6/__init__.py b/brainscore_vision/models/yudixie_resnet18_240719_6/__init__.py new file mode 100644 index 000000000..437f41712 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_6/__init__.py @@ -0,0 +1,12 @@ +from brainscore_vision import model_registry +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from .model import get_model, get_layers + + +def commit_model(identifier): + return ModelCommitment(identifier=identifier, + activations_model=get_model(identifier), + layers=get_layers(identifier)) + +model_registry['yudixie_resnet18_distance_translation_rotation_0_240719'] = lambda: commit_model('yudixie_resnet18_distance_translation_rotation_0_240719') + diff --git a/brainscore_vision/models/yudixie_resnet18_240719_6/model.py b/brainscore_vision/models/yudixie_resnet18_240719_6/model.py new file mode 100644 index 000000000..a51012790 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_6/model.py @@ -0,0 +1,60 @@ +import os +from pathlib import Path +import functools +from urllib.request import urlretrieve + +import numpy as np +import torch +import torch.nn as nn +from torchvision.models import resnet18 + +from brainscore_vision.model_helpers.check_submission import check_models +from brainscore_vision.model_helpers.brain_transformation import ModelCommitment +from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper, load_preprocess_images + + +# Please load your pytorch model for usage in CPU. There won't be GPUs available for scoring your model. +# If the model requires a GPU, contact the brain-score team directly. + + +def get_model(name): + pytorch_device = torch.device('cpu') + + weigth_url = f'https://yudi-brainscore-models.s3.amazonaws.com/{name}.pth' + fh = urlretrieve(weigth_url, f'{name}_weights.pth') + load_path = fh[0] + + pytorch_model = resnet18() + pytorch_model.fc = nn.Linear(pytorch_model.fc.in_features, 674) + pytorch_model = pytorch_model.to(pytorch_device) + + # load model from saved weights + saved_state_dict = torch.load(load_path, map_location=pytorch_device) + state_dict = {} + for k, v in saved_state_dict.items(): + if k.startswith('_orig_mod.'): + # for compiled models + state_dict[k[10:]] = v + else: + state_dict[k] = v + pytorch_model.load_state_dict(state_dict, strict=True) + print(f'Loaded model from {load_path}') + + preprocessing = functools.partial(load_preprocess_images, image_size=224) + wrapper = PytorchWrapper(identifier=name, + model=pytorch_model, + preprocessing=preprocessing) + wrapper.image_size = 224 + return wrapper + + +def get_layers(name): + return ['conv1','layer1', 'layer2', 'layer3', 'layer4', 'fc'] + + +def get_bibtex(model_identifier): + return """xx""" + + +if __name__ == '__main__': + check_models.check_base_models(__name__) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_6/region_layer_map/yudixie_resnet18_distance_translation_rotation_0_240719.json b/brainscore_vision/models/yudixie_resnet18_240719_6/region_layer_map/yudixie_resnet18_distance_translation_rotation_0_240719.json new file mode 100644 index 000000000..b0dc35563 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_6/region_layer_map/yudixie_resnet18_distance_translation_rotation_0_240719.json @@ -0,0 +1,6 @@ +{ + "V1": "layer1", + "V2": "layer2", + "V4": "layer1", + "IT": "layer3" +} \ No newline at end of file diff --git a/brainscore_vision/models/yudixie_resnet18_240719_6/setup.py b/brainscore_vision/models/yudixie_resnet18_240719_6/setup.py new file mode 100644 index 000000000..421914cfb --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_6/setup.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from setuptools import setup, find_packages + +requirements = [ "torchvision", + "torch" +] + +setup( + packages=find_packages(exclude=['tests']), + include_package_data=True, + install_requires=requirements, + license="MIT license", + zip_safe=False, + keywords='brain-score template', + classifiers=[ + 'Development Status :: 2 - Pre-Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Programming Language :: Python :: 3.7', + ], + test_suite='tests', +) diff --git a/brainscore_vision/models/yudixie_resnet18_240719_6/test.py b/brainscore_vision/models/yudixie_resnet18_240719_6/test.py new file mode 100644 index 000000000..e594ba9e1 --- /dev/null +++ b/brainscore_vision/models/yudixie_resnet18_240719_6/test.py @@ -0,0 +1 @@ +# Left empty as part of 2023 models migration