Skip to content

Instantly share code, notes, and snippets.

View devyhia's full-sized avatar

Yehya Abouelnaga devyhia

View GitHub Profile
@devyhia
devyhia / KerasToCoreML.dockerfile
Last active August 11, 2024 20:47
Docker Image for Keras to CoreML Conversion (Also supports Nvidia GPU training and testing)
FROM nvidia/cuda:9.0-cudnn7-devel
# Install Conda
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH /opt/conda/bin:$PATH
RUN apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \
libglib2.0-0 libxext6 libsm6 libxrender1 \
git mercurial subversion
function [] = plotPointsAndBones(img, pose)
% pose.openpose_keypoints{index} should correspond to a Struct of the following format:
% {
% "x": x,
% "y": y,
% "c": confidence,
% "point_label": OpenPoseMap[point_index],
% "point_index": point_index,
% }
@devyhia
devyhia / getPointsOfInterest.m
Created June 29, 2019 11:05
Get OpenPose Keypoints of Interest
function pointsOfInterest = getPointsOfInterest()
pointsOfInterest = [
0; % Nose
1; % Neck
2;3;4; % Right Shoulder / Elbow / Wrist
5;6;7; % LEft shoulder / Elbow / Wrist
8; % mid hip
9; 10; 11; % right hip / knee / ankle
12; 13; 14 % left hip / knee / ankle
@devyhia
devyhia / getBonesOfInterest.m
Created June 29, 2019 11:04
Get OpenPose Points of Interest
function bones = getBonesOfInterest()
bones = [
0 1; % Nose - Neck
1 2; % Neck -> Right Shoulder
2 3; % Right Shoulder -> Right Elbow
3 4; % Right Elbow -> Right Wrist
1 5; % Neck -> Left Shoulder
5 6; % Left Shoulder -> Left Elbow
6 7; % Left Elbow -> Left Wrist
@devyhia
devyhia / convert_openpose_json_to_matlab_poses.py
Last active September 12, 2023 16:44
Convert OpenPose JSON To Matlab Poses
import scipy.io
from tqdm import tqdm
from typing import List, Dict, Any
import json
OpenPoseMap = [
"Nose",
"Neck",
"RShoulder",
"RElbow",