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
from mtcnn import MTCNN | |
detector = MTCNN() | |
data = detector.detect_faces(cv.cvtColor(imq, cv.COLOR_BGR2RGB)) | |
box = data[0]['box'] | |
keypoints = data[0]['keypoints'] | |
# first of all, eyes Y must be within certain % of face height | |
f_height = int(box[3] / 0.3 ) # height in px |
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
PyOpenVR? | |
https://github.com/cmbruns/pyopenvr | |
https://github.com/cmbruns/pyopenvr/blob/master/src/samples/glfw/hellovr_glfw.py | |
VR API for Python? | |
https://github.com/harfang3d | |
OpenCV VR Controllers | |
https://github.com/angrammenos97/OpenCV-VR-Controllers |
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 torch | |
import clip | |
from PIL import Image | |
from pathlib import Path | |
import random, sys, string | |
import shutil | |
import os | |
device = "cuda" if torch.cuda.is_available() else "cpu" | |
model, preprocess = clip.load("ViT-B/32", device=device) |
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
# | |
# ALEPH by Advadnoun, https://colab.research.google.com/drive/1Q-TbYvASMPRMXCOQjkxxf72CXYjR_8Vp | |
# "This is a notebook that uses DALL-E's decoder and CLIP to generate images from text. I will very likely make this better & easier to use in the future." | |
# | |
# rearranged to run locally on faster GPU | |
# | |
# directions: | |
# clone https://github.com/openai/DALL-E/ and https://github.com/openai/CLIP | |
# copy relevant files into one dir with this script | |
# install torch==1.7.1 and other stuff |
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 copy | |
import os | |
import click | |
import numpy as np | |
import PIL.Image | |
import PIL.ImageOps | |
import torch | |
import dnnlib | |
import legacy | |
from tqdm import tqdm |
OlderNewer