MCPcopy Create free account
hub / github.com/VisionLearningGroup/OVANet / find_classes

Function find_classes

data_loader/mydataset.py:13–17  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

11
12
13def find_classes(dir):
14 classes = [d for d in os.listdir(dir) if os.path.isdir(os.path.join(dir, d))]
15 classes.sort()
16 class_to_idx = {classes[i]: i for i in range(len(classes))}
17 return classes, class_to_idx
18
19
20def is_image_file(filename):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected