This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| // Keycodes maps keys to their respective virtual key code from https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes | |
| var Keycodes = map[string]uint16{ | |
| " ": 0x20, | |
| "-": 0xBD, | |
| "0": 0x30, | |
| "1": 0x31, | |
| "2": 0x32, | |
| "3": 0x33, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "log" | |
| "syscall" | |
| "unsafe" | |
| ) | |
| type keyboardInput struct { | |
| wVk uint16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func setupSystray() { | |
| data, err := Asset("images/bitmap.ico") | |
| if err != nil { | |
| fmt.Println("Icon reading error", err) | |
| return | |
| } | |
| systray.SetTemplateIcon(data, data) | |
| systray.SetTitle("Insert Date") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE=html> | |
| <html> | |
| <body> | |
| {% for img in images %} | |
| <h1 > {{img}} </h1> | |
| <img src="images/{{img}}" alt="{{img}}"> | |
| {% endfor %} | |
| </body> | |
| </html>` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @app.route('/images') | |
| def show_images(): | |
| return render_template('images.html', images=os.listdir('static/images')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>webcam</title> | |
| </head> | |
| <body> | |
| <script src="webcam.js"></script> | |
| <div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import unittest | |
| import cv2 as cv | |
| from model import recognize, set_up_inference | |
| class TestDetection(unittest.TestCase): | |
| def setUp(self): | |
| self.net = set_up_inference() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from logging import info | |
| from typing import List | |
| import numpy as np | |
| import cv2 as cv | |
| INPUT_FOLDER = "model/" # where we read the neural network from | |
| # the image size that the neural network is trained to work on. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from logging import info | |
| from typing import List | |
| import numpy as np | |
| import cv2 as cv | |
| INPUT_FOLDER = "model/" # where we read the neural network from | |
| # a pretrained model from OpenVino, see https://docs.openvinotoolkit.org/2018_R5/_docs_Retail_object_detection_pedestrian_rmnet_ssd_0013_caffe_desc_person_detection_retail_0013.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from logging import info | |
| from typing import List | |
| import numpy as np | |
| import cv2 as cv | |
| INPUT_FOLDER = "model/" # where we read the neural network from | |
| # the image size that the neural network is trained to work on. |