Example #1
0
            if frame_count == 0:
                display_time = False
                image = camera.capture_hand2()
                prediction = gesture_rec.predict2(image)
                print(prediction)
                msg = "Moved Sent: {}".format(prediction)

                if prediction == "RELOAD":
                    server_data = "1"
                if prediction == "SHIELD":
                    server_data = "2"
                if prediction == "SHOOT":
                    server_data = "3"

                client.send_data(server_data)
                display_msg = True

                thread2 = threading.Thread(target=client.get_data, args=(que,))
                thread2.start()

        # if key == ord('s'):
        #
        #     break
        if key == ord('q'):
            camera.shutdown()
            break

    except KeyboardInterrupt:
        camera.shutdown()
        break