MCPcopy Create free account
hub / github.com/bingchenlll/FastGAN-pytorch / _parse_frame

Method _parse_frame

operation.py:82–90  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

80 self.transform = transform
81
82 def _parse_frame(self):
83 frame = []
84 img_names = os.listdir(self.root)
85 img_names.sort()
86 for i in range(len(img_names)):
87 image_path = os.path.join(self.root, img_names[i])
88 if image_path[-4:] == '.jpg' or image_path[-4:] == '.png' or image_path[-5:] == '.jpeg':
89 frame.append(image_path)
90 return frame
91
92 def __len__(self):
93 return len(self.frame)

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected