Skip to content

Commit

Permalink
Merge pull request #1 from brain-score/master
Browse files Browse the repository at this point in the history
fix missing extension in StimulusSet files (brain-score#35)
  • Loading branch information
hermessuen authored Jul 31, 2020
2 parents 4bf78a1 + 7892b9e commit bea01dc
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 34 deletions.
68 changes: 34 additions & 34 deletions brainio_collection/lookup.csv
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
identifier,lookup_type,class,location_type,location,sha1,stimulus_set_identifier
dicarlo.hvm,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_hvm.csv,21f3dc64c4a792e4066ce2b69aacc9584879ab24,
dicarlo.hvm,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_hvm.zip,450682a66e19c813e20bd50a0043b75eae06f35d,
gallant.David2004,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_gallant_David2004.csv,96dcb6939f61cefd93904b78fb9fd7f3c5029c07,
gallant.David2004,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_gallant_David2004.zip,417e0a6d51a4488346267d1dc7fa00d67dfa57e5,
tolias.Cadena2017,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_tolias_Cadena2017.csv,fcf2e8e298e74581413dc2848da3779f41d99633,
tolias.Cadena2017,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_tolias_Cadena2017.zip,3f0576433bbd10e3ae204e666a0d7e918b34c415,
movshon.FreemanZiemba2013,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013.csv,f291cef40c64af3f2746b10c80c753127f84fd56,
movshon.FreemanZiemba2013,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013.zip,0f97972c2c5b883b1a45a91f8b047312e1a0d414,
dicarlo.objectome.public,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_objectome_public.csv,3ad365407acc74a47a764b43cb11038ea1fead43,
dicarlo.objectome.public,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_objectome_public.zip,a045b4f4a67d809b1cba6dd1708712861d955e69,
dicarlo.objectome.private,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_objectome_private.csv,26c8a31736cb550cb363b88723a77d3e7f58ed89,
dicarlo.objectome.private,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_objectome_private.zip,fa4dcd8502ca375ecbf39a50e842f5bd324d872b,
dicarlo.Kar2019,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_Kar2019.csv,db32719f58d91f1f73fbe9aabb308c6ee6e15d10,
dicarlo.Kar2019,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_Kar2019.zip,0321ec067419503d137af7b34ae609dd3ed9f25a,
dicarlo.Kar2018cocogray,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_Kar2018cocogray.csv,93e85c8a5284b8f3f5f96242fba51bffb1edc49e,
dicarlo.Kar2018cocogray,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_Kar2018cocogray.zip,165878e0cdd80042a005305c5e545559e28f1536,
dicarlo.hvm-public,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_hvm-public.csv,2b6c91104170799e8d1e615432f76e32f157a92b,
dicarlo.hvm-public,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_hvm-public.zip,84cbc5786d709f05800bd1fba488f4c1402210c1,
dicarlo.hvm-private,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_hvm-private.csv,80555701f1e9333d2966d467f65a564e7f0d5e8c,
dicarlo.hvm-private,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_hvm-private.zip,8ea7bdaf7dfaab4669e3e465494365e4e273fd23,
movshon.FreemanZiemba2013-public,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013-public.csv,575de0bfc85745599b6a1aee09ac01b3a6785de0,
movshon.FreemanZiemba2013-public,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013-public.zip,514cd2c98b903fdb76604770f9ad582b22e8ac6f,
movshon.FreemanZiemba2013-private,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013-private.csv,31f7bf3016918efd5728112f73a18c59554544d5,
movshon.FreemanZiemba2013-private,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013-private.zip,607cbe4fb6e0834b474804a786c447cc84ea1866,
klab.Zhang2018.search_obj_array,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_klab_Zhang2018_search_obj_array.csv,6b56fcaffb6e4ba734655111908e0bb06141d75e,
klab.Zhang2018.search_obj_array,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_klab_Zhang2018_search_obj_array.zip,b03ca61dad08bc05601e94165167fabeb6c114eb,
movshon.FreemanZiemba2013.aperture-public,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013_aperture-public.csv,7c28484e04f5411ad28e46be2dc1f38774219de6,
movshon.FreemanZiemba2013.aperture-public,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013_aperture-public.zip,47827f3db50bf1e61e13bb0ac81246b036016df6,
movshon.FreemanZiemba2013.aperture-private,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013_aperture-private.csv,24f0c4cbc031add1c90aff2a42f600614a013a26,
movshon.FreemanZiemba2013.aperture-private,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013_aperture-private.zip,9194799e13aba976450348bb0775ca9362452bde,
movshon.FreemanZiemba2013.aperture,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013_aperture.csv,b566d1e50b5acb19e00834f54c017aa43dd1e7d1,
movshon.FreemanZiemba2013.aperture,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013_aperture.zip,acfffa1fdd10d1c73e7c46c1469cc48b9527893a,
dicarlo.Rajalingham2020orthographic_IT,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_Rajalingham2020orthographic_IT.csv,e9a940e1a6103d6e8150f4a99e0f2019143127a7,
dicarlo.Rajalingham2020orthographic_IT,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_Rajalingham2020orthographic_IT.zip,2928f1a9d8e3853ed3ce7e93095388347d818dce,
dicarlo.hvm,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_hvm.csv,6c5bbadbca9ab37c7ccb7e8991c3acde0e58055a,
dicarlo.hvm,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_hvm.zip,355b9e5986b085ef669ea16c21b348d5b023fd9e,
gallant.David2004,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_gallant_David2004.csv,8ec76338b998cadcdf1e57edd2dd992e2ab2355b,
gallant.David2004,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_gallant_David2004.zip,0200421d66a0613946d39cab64c00b561160016e,
tolias.Cadena2017,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_tolias_Cadena2017.csv,f55b174cc4540e5612cfba5e695324328064b051,
tolias.Cadena2017,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_tolias_Cadena2017.zip,88cc2ce3ef5e197ffd1477144a2e6a68d424ef6c,
movshon.FreemanZiemba2013,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013.csv,ed69b7dfa4ecf83f4c852e66f40f0d6e603dd0bb,
movshon.FreemanZiemba2013,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013.zip,1337be1c7ec5e890ea12ed1bd4ff1257d53ffac8,
dicarlo.objectome.public,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_objectome_public.csv,47884e17106a3be471d6481279cab33889b80850,
dicarlo.objectome.public,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_objectome_public.zip,064f2955f98e63867755fee2e3ead8cddf6bfab8,
dicarlo.objectome.private,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_objectome_private.csv,ac38e8f7c08fa8294ed25a3bf84a6adb108bf3fc,
dicarlo.objectome.private,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_objectome_private.zip,ccd39f7f9b8b4a92da06e3960d06225e46208593,
dicarlo.Kar2019,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_Kar2019.csv,7f705bdea02c0a72a76d7f5e7b6963531df818a6,
dicarlo.Kar2019,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_Kar2019.zip,75ab7b8b499fc8e86c813f717b79d268bcb986be,
dicarlo.Kar2018cocogray,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_Kar2018cocogray.csv,be9bb267b80fd7ee36a88d025b73ae8a849165da,
dicarlo.Kar2018cocogray,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_Kar2018cocogray.zip,1457003ee9b27ed51c018237009fe148c6e71fd3,
dicarlo.hvm-public,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_hvm-public.csv,3eff77e18169cca7cf20b74b4af47418b8ab5d51,
dicarlo.hvm-public,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_hvm-public.zip,e73d4c87db8358dd94168bda4bf608d2aedb5d33,
dicarlo.hvm-private,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_hvm-private.csv,52b84facedde59f59784526d7c58c92a1120658f,
dicarlo.hvm-private,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_hvm-private.zip,a8c25f295bff3792a3453e35a9261197a4629a64,
movshon.FreemanZiemba2013-public,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013-public.csv,407dcd3fc08388cf267a2c493d258fc22c13a54b,
movshon.FreemanZiemba2013-public,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013-public.zip,d4736ce529f6f6664f46b42ccc8a1f073d7c5e1a,
movshon.FreemanZiemba2013-private,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013-private.csv,6766399067f62fbeac2ee601cc107678ff31fdb6,
movshon.FreemanZiemba2013-private,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013-private.zip,cd287c46059fd6b42922511327bc4000d529708a,
klab.Zhang2018.search_obj_array,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_klab_Zhang2018_search_obj_array.csv,e9c2f6b35b84256242d257e8d36261aa26d3ed4a,
klab.Zhang2018.search_obj_array,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_klab_Zhang2018_search_obj_array.zip,d92dfb20a87bb9a015c77c2862a215e8fa4f2cc3,
movshon.FreemanZiemba2013.aperture-public,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013_aperture-public.csv,e2e5e8f848c9acd9f501838451122cb845c5c105,
movshon.FreemanZiemba2013.aperture-public,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013_aperture-public.zip,192df52da3da04def68619d593cde562e8fe9598,
movshon.FreemanZiemba2013.aperture-private,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013_aperture-private.csv,7a6fc8b10ba775c2ad85c02316051d729b457d38,
movshon.FreemanZiemba2013.aperture-private,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013_aperture-private.zip,ab8f128d489ca13867b4a8df3851548c9251b90e,
movshon.FreemanZiemba2013.aperture,stimulus_set,StimulusSet,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013_aperture.csv,abb7bfaf9a7b2d77407c13ddda872ae6a8608b78,
movshon.FreemanZiemba2013.aperture,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image_movshon_FreemanZiemba2013_aperture.zip,069d4fd71a7be0b4bf0967abe030d3ee26b6166d,
dicarlo.Rajalingham2020orthographic_IT,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_Rajalingham2020orthographic_IT.csv,3ac9ab73b653ac9cf839f9bfde131354a3766ccd,
dicarlo.Rajalingham2020orthographic_IT,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_Rajalingham2020orthographic_IT.zip,0e025f6f8b06e803a6d8d1a17bd25a41af3e81db,
dicarlo.MajajHong2015,assembly,NeuronRecordingAssembly,S3,https://brainio.dicarlo.s3.amazonaws.com/assy_dicarlo_MajajHong2015.nc,bf8f8d01010d727e3db3f85a9bd5f95f9456b7ec,dicarlo.hvm
gallant.David2004,assembly,NeuronRecordingAssembly,S3,https://brainio.contrib.s3.amazonaws.com/assy_gallant_David2004.nc,d2ed9834c054da2333f5d894285c9841a1f27313,gallant.David2004
dicarlo.MajajHong2015.temporal,assembly,NeuronRecordingAssembly,S3,https://brainio.dicarlo.s3.amazonaws.com/assy_dicarlo_MajajHong2015_temporal.nc,4c5cfe25ad53162c5c716d64004de269162eff38,dicarlo.hvm
Expand Down
2 changes: 2 additions & 0 deletions brainio_collection/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def create_image_zip(proto_stimulus_set, target_zip_path):
with zipfile.ZipFile(target_zip_path, 'w') as target_zip:
for _, row in proto_stimulus_set.iterrows(): # using iterrows instead of itertuples for very large StimulusSets
image_path = proto_stimulus_set.get_image(row['image_id'])
extension = os.path.splitext(image_path)[1]
arcname = row['image_path_within_store'] if hasattr(row, 'image_path_within_store') else row['image_id']
arcname = arcname + extension
target_zip.write(image_path, arcname=arcname)
arcnames.append(arcname)
sha1 = sha1_hash(target_zip_path)
Expand Down
2 changes: 2 additions & 0 deletions tests/test_stimuli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def test_get_stimulus_set():
for image_id in stimulus_set['image_id']:
image_path = stimulus_set.get_image(image_id)
assert os.path.exists(image_path)
extension = os.path.splitext(image_path)[1]
assert extension in ['.png', '.PNG', '.jpg', '.jpeg', '.JPG', '.JPEG']


def test_loadname_dicarlo_hvm():
Expand Down

0 comments on commit bea01dc

Please sign in to comment.