Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: single positional indexer is out-of-bounds #111

Open
pascal-maker opened this issue May 30, 2024 · 0 comments
Open

IndexError: single positional indexer is out-of-bounds #111

pascal-maker opened this issue May 30, 2024 · 0 comments

Comments

@pascal-maker
Copy link

Hello when i run the command : !python /content/Medical-SAM-Adapter/train.py -net sam -mod sam_adpt -exp_name pascal_run -sam_ckpt ./checkpoint/sam/sam_vit_b_01ec64.pth -image_size 1024 -b 32 -dataset isic -data_path /content/drive/MyDrive/ISIC/data/isic
I receive the following error : Contents of the destination directory: ['ISBI2016_ISIC_Part1_Test_GroundTruth.csv', 'ISBI2016_ISIC_Part1_Training_GroundTruth.csv']
Namespace(net='sam', baseline='unet', encoder='default', seg_net='transunet', mod='sam_adpt', exp_name='pascal_run', type='map', vis=None, reverse=False, pretrain=False, val_freq=5, gpu=True, gpu_device=0, sim_gpu=0, epoch_ini=1, image_size=1024, out_size=256, patch_size=2, dim=512, depth=1, heads=16, mlp_dim=1024, w=4, b=32, s=True, warm=1, lr=0.0001, uinch=1, imp_lr=0.0003, weights=0, base_weights=0, sim_weights=0, distributed='none', dataset='isic', sam_ckpt='./checkpoint/sam/sam_vit_b_01ec64.pth', thd=False, chunk=None, num_sample=4, roi_size=96, evl_chunk=None, mid_dim=None, multimask_output=1, data_path='/content/drive/MyDrive/ISIC/data/isic', path_helper={'prefix': 'logs/pascal_run_2024_05_30_10_06_55', 'ckpt_path': 'logs/pascal_run_2024_05_30_10_06_55/Model', 'log_path': 'logs/pascal_run_2024_05_30_10_06_55/Log', 'sample_path': 'logs/pascal_run_2024_05_30_10_06_55/Samples'})
Traceback (most recent call last):
File "/content/Medical-SAM-Adapter/train.py", line 147, in
main()
File "/content/Medical-SAM-Adapter/train.py", line 74, in main
nice_train_loader, nice_test_loader = get_dataloader(args)
^^^^^^^^^^^^^^^^^^^^
File "/content/Medical-SAM-Adapter/dataset/init.py", line 46, in get_dataloader
isic_train_dataset = ISIC2016(args, args.data_path, transform = transform_train, transform_msk= transform_train_seg, mode = 'Training')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/content/Medical-SAM-Adapter/dataset/isic.py", line 16, in init
self.name_list = df.iloc[:,1].tolist()
~~~~~~~^^^^^
File "/usr/local/lib/python3.12/site-packages/pandas/core/indexing.py", line 1184, in getitem
return self._getitem_tuple(key)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pandas/core/indexing.py", line 1690, in _getitem_tuple
tup = self._validate_tuple_indexer(tup)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pandas/core/indexing.py", line 966, in _validate_tuple_indexer
self._validate_key(k, i)
File "/usr/local/lib/python3.12/site-packages/pandas/core/indexing.py", line 1592, in _validate_key
self._validate_integer(key, axis)
File "/usr/local/lib/python3.12/site-packages/pandas/core/indexing.py", line 1685, in _validate_integer
raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds. I havre set up my datastructure as our dataset folder under "your_data_path" should be like: ISIC/ ISBI2016_ISIC_Part1_Test_Data/...

ISBI2016_ISIC_Part1_Training_Data/...

ISBI2016_ISIC_Part1_Test_GroundTruth.csv

ISBI2016_ISIC_Part1_Training_GroundTruth.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant