MCPcopy Create free account
hub / github.com/IgaoGuru/Sequoia / update

Method update

utils/datasets.py:289–299  ·  view source on GitHub ↗
(self, index, cap)

Source from the content-addressed store, hash-verified

287 print('WARNING: Different stream shapes detected. For optimal performance supply similarly-shaped streams.')
288
289 def update(self, index, cap):
290 # Read next stream frame in a daemon thread
291 n = 0
292 while cap.isOpened():
293 n += 1
294 # _, self.imgs[index] = cap.read()
295 cap.grab()
296 if n == 4: # read every 4th frame
297 _, self.imgs[index] = cap.retrieve()
298 n = 0
299 time.sleep(0.01) # wait time
300
301 def __iter__(self):
302 self.count = -1

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected