Skip to content

Instantly share code, notes, and snippets.

View otmb's full-sized avatar

Manabu Otsu otmb

  • Infocom
  • Tokyo
View GitHub Profile
<!doctype html>
<html>
<head>
<title>Camera Sample</title>
<style>
#viewer {
width: 720px;
height: 480px;
position: relative;
background-color: #000000;
@otmb
otmb / README.md
Last active September 11, 2020 09:09
OpenPose Caffe Model Convert to CoreML Model

Base Refelence at melito

Start Coremltool

Before Setup coremltools

$ export PATH="$HOME/miniconda2/bin:$PATH"
$ source activate coreml
@otmb
otmb / README.md
Last active December 18, 2018 10:17
Create maximum_filter in OpenCV style
@otmb
otmb / README.md
Last active August 14, 2024 02:38
MLMultiArray to Double Array

Sample Data

Get cat.bin

Xcode Resources Add cat.bin

resources.png

Playground

import CoreML
@otmb
otmb / blob.md
Last active May 30, 2018 07:48
How to handle ArrayBinary(Float)

Python blob Write

data = np.array([1.0, 2.0, 3.0, 4.0],dtype=np.float32)
with open("[filename]", "wb") as f:
    byte = np.array(data,dtype=np.float32).tobytes()
    f.write(byte)

Python blob Read

@otmb
otmb / README.md
Created July 12, 2018 17:52
WebAssemblyをNodejs環境なしで試す

Build Zstd Unity(ios/mac)

wget https://github.com/facebook/zstd/archive/v1.3.5.zip
cd zstd-1.3.5/build/cmake
mkdir ios
cd ios

wget https://raw.githubusercontent.com/leetal/ios-cmake/master/ios.toolchain.cmake

cmake .. -DCMAKE_TOOLCHAIN_FILE=ios.toolchain.cmake -DIOS_PLATFORM=SIMULATOR64
@otmb
otmb / Jetfire.cs
Last active December 4, 2018 09:48
Jetfire Unity Native
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System;
using UnityEngine;
using AOT;
namespace UnityEngine.XR.iOS
{
public class Jetfire {
@otmb
otmb / KinectView.cs
Last active December 4, 2018 09:48
KinectV2 visualize
using UnityEngine;
using Windows.Kinect;
using System.Runtime.InteropServices;
using System;
using System.Linq;
using UnityEngine.Rendering;
[RequireComponent(typeof(MeshRenderer))]
[RequireComponent(typeof(MeshFilter))]
public class KinectView : MonoBehaviour {
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// https://www.csharpcodi.com/vs2/1607/MBINCompiler/MBINCompiler/HalfHelper.cs/
public static class HalfHelper
{
private static uint[] mantissaTable = GenerateMantissaTable();
private static uint[] exponentTable = GenerateExponentTable();