From e7b0b7ea67cb9a02e11ca18d370b3f814c519142 Mon Sep 17 00:00:00 2001 From: Katherine Fairchild Date: Thu, 11 Jan 2024 10:14:46 -0500 Subject: [PATCH] Revert "brain-score.org (user:484) | Add new plugin(s): models: [regnet] " (#499) --- brainscore_vision/models/regnet/__init__.py | 14 -------------- brainscore_vision/models/regnet/model.py | 17 ----------------- brainscore_vision/models/regnet/test.py | 17 ----------------- 3 files changed, 48 deletions(-) delete mode 100644 brainscore_vision/models/regnet/__init__.py delete mode 100644 brainscore_vision/models/regnet/model.py delete mode 100644 brainscore_vision/models/regnet/test.py diff --git a/brainscore_vision/models/regnet/__init__.py b/brainscore_vision/models/regnet/__init__.py deleted file mode 100644 index 0c95e6360..000000000 --- a/brainscore_vision/models/regnet/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -from brainscore_vision import model_registry -from brainscore_vision.model_helpers.brain_transformation import ModelCommitment -from .model import get_model, LAYERS - -BIBTEX = """@inproceedings{radosavovic2020designing, - title={Designing network design spaces}, - author={Radosavovic, Ilija and Kosaraju, Raj Prateek and Girshick, Ross and He, Kaiming and Doll{\'a}r, Piotr}, - booktitle={Proceedings of the IEEE/CVF conference on computer vision and pattern recognition}, - pages={10428--10436}, - year={2020} -}""" - -model_registry['regnet_y_400mf'] = lambda: ModelCommitment( - identifier='regnet_y_400mf', activations_model=get_model(), layers=LAYERS) diff --git a/brainscore_vision/models/regnet/model.py b/brainscore_vision/models/regnet/model.py deleted file mode 100644 index 4690dbcbd..000000000 --- a/brainscore_vision/models/regnet/model.py +++ /dev/null @@ -1,17 +0,0 @@ -import functools - -import torchvision.models - -from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper -from brainscore_vision.model_helpers.activations.pytorch import load_preprocess_images - -# these layer choices were not investigated in any depth, we blindly picked all high-level blocks -LAYERS = ['trunk_output.block1', 'trunk_output.block2', 'trunk_output.block3', 'trunk_output.block4'] - - -def get_model(): - model = torchvision.models.regnet_y_400mf(pretrained=True) - preprocessing = functools.partial(load_preprocess_images, image_size=224) - wrapper = PytorchWrapper(identifier='regnet_y_400mf', model=model, preprocessing=preprocessing) - wrapper.image_size = 224 - return wrapper diff --git a/brainscore_vision/models/regnet/test.py b/brainscore_vision/models/regnet/test.py deleted file mode 100644 index ad9c5b3bf..000000000 --- a/brainscore_vision/models/regnet/test.py +++ /dev/null @@ -1,17 +0,0 @@ -import logging -import sys - -import pytest -from pytest import approx - -from brainscore_vision import score - -logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) - - -@pytest.mark.travis_slow -@pytest.mark.memory_intense -def test_score(): - actual_score = score(model_identifier="regnet_y_400mf", benchmark_identifier="MajajHong2015public.IT-pls", - conda_active=True) - assert actual_score == approx(0.532, abs=0.0005)