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 argparse | |
import cv2 | |
import numpy as np | |
parser = argparse.ArgumentParser(add_help=False) | |
parser.add_argument("--image", default='samples/image.jpg', help="image for prediction") | |
parser.add_argument("--config", default='cfg/yolov3.cfg', help="YOLO config path") | |
parser.add_argument("--weights", default='yolov3.weights', help="YOLO weights path") | |
parser.add_argument("--names", default='data/coco.names', help="class names path") |
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 argparse | |
import cv2 | |
import numpy as np | |
def get_corrected_img(img1, img2): | |
MIN_MATCHES = 50 | |
orb = cv2.ORB_create(nfeatures=500) |
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
<html> | |
<body> | |
<video id="video" width="480" height="320" autoplay playsinline></video> | |
<script> | |
const videoElement = document.getElementById('video'); | |
navigator.mediaDevices.getUserMedia({ video: true, audio: false }) | |
.then(stream => { | |
videoElement.srcObject = stream; | |
videoElement.play(); |
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
<html> | |
<head> | |
<!-- Load Tensorflow and BodyPix --> | |
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]"></script> | |
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/[email protected]"></script> | |
</head> | |
<body> | |
<img hidden id='image' src='/img/sample.jpg' /> |