/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
ShareSimilar codes
Share