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
import zmq | |
import json | |
import argparse | |
import os | |
import datetime | |
def main(): | |
context = zmq.Context() | |
socket = context.socket(zmq.REP) |
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
import open3d as o3d | |
import numpy as np | |
import json | |
def get_first_landmarks_in_frames(): | |
face_landmark_frames = json.load(open("face_landmark_frames_20200425-220448.json", "r")) | |
return [np.array(face_landmark_frames[0][0]['landmarks']) for face_landmark_frame in face_landmark_frames] | |
first_landmarks = get_first_landmarks_in_frames() |
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
# MediaPipe graph that performs multi-hand tracking with TensorFlow Lite on GPU. | |
# Used in the examples in | |
# mediapipe/examples/android/src/java/com/mediapipe/apps/multihandtrackinggpu. | |
# Images coming into and out of the graph. | |
input_stream: "input_video" | |
output_stream: "output_video" | |
# Collection of detected/processed faces, each represented as a list of | |
# landmarks. (std::vector<NormalizedLandmarkList>) |
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
# MediaPipe graph that performs multi-hand tracking with TensorFlow Lite on GPU. | |
# Used in the examples in | |
# mediapipe/examples/android/src/java/com/mediapipe/apps/multihandtrackinggpu. | |
# Images coming into and out of the graph. | |
input_stream: "input_video" | |
output_stream: "output_video" | |
# Collection of detected/processed faces, each represented as a list of | |
# landmarks. (std::vector<NormalizedLandmarkList>) |
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
import zmq | |
import sys | |
context = zmq.Context() | |
subscriber = context.socket(zmq.SUB) | |
subscriber.connect("tcp://localhost:5555") | |
# receive only message with zipcode being 10001 | |
zipfilter = sys.argv if len(sys.argv) > 1 else "Detection" | |
subscriber.setsockopt(zmq.SUBSCRIBE, zipfilter.encode('utf-8')) |
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
using UnityEngine; | |
using VRM; | |
using AsyncIO; | |
using NetMQ; | |
using NetMQ.Sockets; | |
using MessagePack; | |
using System; |
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
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gdk | |
from gi.repository import GdkPixbuf | |
import numpy | |
def get_window_screen(window_id): | |
window = Gdk.get_default_root_window() | |
screen = window.get_screen() | |
typ = window.get_type_hint() |
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
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gdk | |
from gi.repository import GdkPixbuf | |
import numpy | |
def get_window_screen(window_id): | |
window = Gdk.get_default_root_window() | |
screen = window.get_screen() | |
typ = window.get_type_hint() |
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
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gdk | |
from gi.repository import GdkPixbuf | |
import numpy | |
def get_window_screen(window_id): | |
window = Gdk.get_default_root_window() | |
screen = window.get_screen() | |
typ = window.get_type_hint() |