Repository navigation
What is the class name of the image? #8
Description
Activity
Hi, I am also doing this kind of research. May I know if you solve this problem? Do you get the image class name?
Hello. I checked the object ID (n0.......etc) and found it by comparing it with the object class name of ImageNet.
Reacted by ZIYI ZENG and WangThanks so much for your explanation. It answered my doubts.
Reacted by WangHello. I checked the object ID (n0.......etc) and found it by comparing it with the object class name of ImageNet.
Hello, could you please provide me with an example? When I load data from the file eeg_55_95_std.pth, I notice that data for some subjects contains 1,996 trials instead of the expected 2,000. Thank you very much for your help!
I have learned how to pair images with EEG data, as shown in the code below:
import torch import numpy as np from pathlib import Path import os block_splits_by_image_all = "xxx/block_splits_by_image_all.pth" block_splits_by_image_single = "xxx/block_splits_by_image_single.pth" eeg_55_95_std = "xxx/EEG_ImageNet1/eeg_55_95_std.pth" eeg_signals_raw_with_mean_std = "xxx/eeg_signals_raw_with_mean_std.pth" data_image_all = torch.load(block_splits_by_image_all) data_image_single = torch.load(block_splits_by_image_single) data_eeg_std = torch.load(eeg_55_95_std) data_eeg_raw = torch.load(eeg_signals_raw_with_mean_std) all_images = data_eeg_std['images'] all_labels = data_eeg_std['labels'] save_root = Path("xxxx") for i in range(len(data_eeg_std['dataset'])): print(f"第{i}个样本的 dataset:", data_eeg_std['dataset'][i]['subject']) sub_id = data_eeg_std['dataset'][i]['subject'] label = all_labels[data_eeg_std['dataset'][i]['label']] image = all_images[data_eeg_std['dataset'][i]['image']] save_name = f"{sub_id - 1}_{image}.npy" os.makedirs(save_root / str("sub_" + str(sub_id-1)) / label, exist_ok=True) save_path = save_root / str("sub_" + str(sub_id-1)) / label / save_name print(f"正在保存: {save_path} | label: {label} | image: {image}") np.save(save_path, data_eeg_std['dataset'][i]['eeg'])
Their paper mentions that a total of 36 bad segments were rejected, so the number of EEG trials for the subject is not 2000.
Reacted by Wang and Plato
Hello. I am conducting research using the dataset, and I would like to ask about the names of the 40 classes taken from ImageNet because they are not listed separately.
If possible, please let me know the actual class names or indices of ImageNet!