from tqdm import tqdm
from collections import OrderedDict
import csv
def read_names(file_path):
names = []
This file contains 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
#!/usr/bin/env bash | |
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | |
cd "$SCRIPTPATH" | |
for dir in */ ; do | |
echo "$dir" | |
cd "$SCRIPTPATH/$dir" |
This file contains 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
# Python 3 - Encrypt/Decrypt using AES 256 | |
# pip install pycryptodome | |
# Crypto.__version__ == 3.20.0 | |
import base64 | |
import hashlib | |
from Crypto.Cipher import AES | |
from Crypto.Random import get_random_bytes |
This file contains 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
def crop_face(image_path, x, y, width, height, grow=0.25): | |
try: | |
image = cv2.imread(image_path) | |
image_width = image.shape[1] | |
image_height = image.shape[0] | |
x = max(0, min(image_width - 1, x)) | |
y = max(0, min(image_height - 1, y)) |
The following steps shows how to cross compiling ONNX Runtime on Ubuntu for Raspberry Pi with docker.
In the name of God
This gist contains implementation of Embedding Similarity Measurement in C++
and Python
.
NewerOlder