uiux
Regular
For what it's worth:
This is logic to get a frame from a webcam to process with akida, eg. the one shot learning demo
akida-camera/akida_camera.py at master · stdp/akida-camera
Learning how to use the Akida neuromorphic processor with a Camera feed - stdp/akida-camera
github.com
Python:
def infer(self):
while True:
input_array = camera.get_input_array()
predictions = self.model_ak.predict_classes(input_array, num_classes=NUM_CLASSES)
if predictions[0] in SAVED:
self.camera.label = LABELS.get(predictions[0], predictions[0])
self.camera.shots = "{} shot/s".format(SHOTS.get(predictions[0]))
time.sleep(1 / INFERENCE_PER_SECOND)
This is logic to get a frame from a webcam to process with akida, eg. the one shot learning demo