supl

Supplementary Files

Code Repository: GitHub - braindecoding/supl
Code Page: Page - braindecoding/oaa
Supplementary Files Repository: GitHub - braindecoding/supl
Supplementary Files Page: Page - braindecoding/supl

The Supplementary Files directory contains two subfolders under the experiments folder:

  1. vg – using the Van Gerven dataset
  2. miawaki – using the Miyawaki dataset

VG Folder

This folder contains:

Running runvg.bat inside the plot folder generates FID_Result.csv, along with calculations and reconstructed images for each latent variable, intermediate dimension, batch size, and iteration.

Structure of the plot Folder

After running runvg.bat, the plot folder contains multiple subfolders, each representing different configurations of latent variables, intermediate dimensions, batch sizes, and iterations.

Example Folder Structure:

plot/
│── 9_128_10_500/
│── 9_128_10_1000/
│── 9_128_10_1500/
│   ├── plot/
│   │   ├── fig.png
│   │   ├── graph.png
│   │   ├── result.png
│   ├── rec/
│   │   ├── image_0.png
│   │   ├── image_1.png
│   │   ├── image_2.png
│   │   ├── image_3.png
│   │   ├── image_4.png
│   │   ├── image_5.png
│   │   ├── image_6.png
│   │   ├── image_7.png
│   │   ├── image_8.png
│   │   ├── image_9.png
│   ├── score/
│   │   ├── score.csv
│   ├── stim/
│   │   ├── image_0.png
│   │   ├── image_1.png
│   │   ├── image_2.png
│   │   ├── image_3.png
│   │   ├── image_4.png
│   │   ├── image_5.png
│   │   ├── image_6.png
│   │   ├── image_7.png
│   │   ├── image_8.png
│   │   ├── image_9.png

Folder Details:

This structure is repeated for each configuration folder (e.g., 9_128_10_500, 9_128_10_1000, 9_128_10_1500), where the numbers indicate different parameter settings.

Understanding the Folder Naming Convention

Each folder inside plot/ follows this naming format:

K_intermediateDim_batchSize_maxIter/

Where:

How the fidvg.py Script Works

The fidvg.py script is responsible for computing the Frechet Inception Distance (FID) score and organizing the results:

  1. The script receives four parameters when executed:
    python fidvg.py K intermediate_dim batch_size maxiter
    
  2. It generates the folder name based on the parameters:
    rootfolder = f"{K}_{intermediate_dim}_{batch_size}_{maxiter}/"
    
  3. Inside this folder, it creates:
    • stim/ → Stores original stimulus images
    • rec/ → Stores reconstructed images
  4. It calculates the FID score by comparing images in stim/ and rec/.
  5. The FID score is saved in FID_Results.csv with the following format:
    K, intermediate_dim, batch_size, maxIter, fid_value
    

Example Execution:

If the script is run with:

python fidvg.py 9 128 10 1000

It will generate a folder:

plot/
│── 9_128_10_1000/
│   ├── plot/
│   ├── rec/
│   ├── score/
│   ├── stim/

And append a line to FID_Results.csv:

9,128,10,1000, <FID Score>

Miawaki Folder

To reduce the size of the supplementary file, the Miyawaki folder contains several sampled results. This folder includes experiments using the Miyawaki dataset, such as:

Structure of the Miawaki Folder

miawaki/
│── knn/
│   ├── 18_512_40_1500_2.png
│   ├── 18_512_50_500_1.png
│   ├── 18_512_50_500_2.png
│   ├── 18_512_50_1000_1.png
│   ├── 18_512_50_1000_2.png
│   ├── 18_512_50_1500_1.png
│   ├── 18_512_50_1500_2.png
├── FID_Results_Figure.png
├── FID_Results_My.csv
├── FID_Results_Vg.csv
├── FID_Results18.csv
├── FID_Results18.xlsx
├── FID_Results512-1300.csv
├── FID_ResultsKNNmiya.csv
├── FID_ResultsKNNmiya.xlsx

Folder Details: