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

p #95

Open
icegomic opened this issue Jun 26, 2022 · 2 comments
Open

p #95

icegomic opened this issue Jun 26, 2022 · 2 comments

Comments

@icegomic
Copy link

No description provided.

@icegomic
Copy link
Author

icegomic commented Jun 26, 2022


KeyError Traceback (most recent call last)
in
----> 1 run('p2ch13.prepcache.LunaPrepCacheApp')

in run(app, *argv)
5
6 app_cls = importstr(*app.rsplit('.', 1)) # <2>
----> 7 app_cls(argv).main()
8
9 log.info("Finished: {}.{!r}).main()".format(app, argv))

~\Documents\pythonProjects\pytorch-learning\p2ch13\prepcache.py in main(self)
49
50 self.prep_dl = DataLoader(
---> 51 PrepcacheLunaDataset(
52 # sortby_str='series_uid',
53 ),

~\Documents\pythonProjects\pytorch-learning\p2ch13\dsets.py in init(self, *args, **kwargs)
345 super().init(*args, **kwargs)
346
--> 347 self.candidateInfo_list = getCandidateInfoList()
348 self.pos_list = [nt for nt in self.candidateInfo_list if nt.isNodule_bool]
349

~\Documents\pythonProjects\pytorch-learning\p2ch13\dsets.py in getCandidateInfoList(requireOnDisk_bool)
47 annotationCenter_xyz = tuple([float(x) for x in row[1:4]])
48 annotationDiameter_mm = float(row[4])
---> 49 isMal_bool = {'False': False, 'True': True}[row[5]]
50
51 candidateInfo_list.append(

KeyError: '1.0'

@icegomic
Copy link
Author

I have fixed this error.
the reason is that the row[5] in file annotations_with_malignancy.csv value is '1.0' or '0.0', but the code recive 'True' or 'False'
I modify the code as isMal_bool = {'0.0': False, '1.0': True}[row[5]] #isMal_bool = {'False': False, 'True': True}[row[5]]

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