MedARC-AI / fMRI-reconstruction-NSD

fMRI-to-image reconstruction on the NSD dataset.
MIT License
280 stars 39 forks source link

Fix text voxel2clip and the eval notebook #8

Closed jimgoo closed 1 year ago

jimgoo commented 1 year ago

The Evaluation.ipynb notebook had its content duplicated in my last PR by mistake, so I removed the extra copy at the end and also added an outdir parameter to save the reconstructions into (useful for tracking multiple versions of CLIP image, text, image+text, etc).

For the train_voxel2clip.py script, I updated it to work with text CLIP by bringing in the change made to the e2e script. In the validation loop, I think the mixco parameters were mistakenly being passed in to the utils.mixco_nce loss, so I took those out since it was throwing exceptions.