/Python/Def get_label(Dir): for nextdir in os.listdir(Dir): if not nextdir.startswith('.'): if nextdir in ['NORMAL']: label = 0 elif nextdir in ['PNEUMONIA']: label = 1 else: label = 2 return nextdir, label
Def get_label(Dir): for nextdir in os.listdir(Dir): if not nextdir.startswith('.'): if nextdir in ['NORMAL']: label = 0 elif nextdir in ['PNEUMONIA']: label = 1 else: label = 2 return nextdir, label
Def get_label(Dir): for nextdir in os.listdir(Dir): if not nextdir.startswith('.'): if nextdir in ['NORMAL']: label = 0 elif nextdir in ['PNEUMONIA']: label = 1 else: label = 2 return nextdir, label
0
- 6 votes171 views6 answers
- 0 vote180 views1 answer
- 0 vote223 views1 answer
- 1 vote140 views1 answer
- 2 votes174 views1 answer
- 0 vote172 views1 answer
- 3 votes201 views2 answers
- 2 votes139 views1 answer
- 12 votes174 views6 answers
- 0 vote188 views1 answer