MCPcopy Create free account
hub / github.com/llSourcell/YOLO_Object_Detection / walk

Method walk

darkflow/utils/loader.py:123–138  ·  view source on GitHub ↗
(self, size)

Source from the content-addressed store, hash-verified

121 self.offset = 16
122
123 def walk(self, size):
124 if self.eof: return None
125 end_point = self.offset + 4 * size
126 assert end_point <= self.size, \
127 'Over-read {}'.format(self.path)
128
129 float32_1D_array = np.memmap(
130 self.path, shape = (), mode = 'r',
131 offset = self.offset,
132 dtype='({})float32,'.format(size)
133 )
134
135 self.offset = end_point
136 if end_point == self.size:
137 self.eof = True
138 return float32_1D_array
139
140def model_name(file_path):
141 file_name = basename(file_path)

Callers 1

loadMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected