Skip to content

Instantly share code, notes, and snippets.

View nulledge's full-sized avatar

NULLEDGE nulledge

View GitHub Profile
@nulledge
nulledge / requirement.md
Last active August 8, 2021 14:03
자작 NAS 프로젝트

자작 NAS 프로젝트

요구사항

작지만 성능 좋은 NAS를 만들자!

이런 목표를 가지고 아래의 기본 요구사항을 세웠다.

케이스 (U-NAS NSC-810A)

@nulledge
nulledge / MPI-INF-3DHP.ipynb
Created October 29, 2018 07:49
MPI-INF-3DHP
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nulledge
nulledge / C2F converter.ipynb
Created October 25, 2018 06:09
Torch7 to PyTorch converter
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nulledge
nulledge / MATLABengine.ipynb
Created October 1, 2018 02:11
Convert Human3.6M from MATLAB to Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
var cond_A = 1, cond_B = 2
var ret_A = 10, ret_B = 20, ret_C = 30
for (cond = 1; cond <= 3; cond ++) {
var ret = cond == cond_A ? ret_A : cond == cond_B ? ret_B : ret_C
print(cond, ret)
}
/* Return
1 10
function [Proj D radial tan r2] = ProjectPointRadial(P, R, T, f, c, k, p)
N = size(P,1);
X = R*(P'-T'*ones(1,N));
XX = X(1:2,:)./([1; 1]*X(3,:));
r2 = XX(1,:).^2 + XX(2,:).^2;
radial = 1 + dot(repmat(k',[1 N]), [r2; r2.^2; r2.^3], 1);
tan = p(1)*XX(2,:) + p(2)*XX(1,:);
XXX = XX.*repmat(radial+tan,[2 1]) + [p(2) p(1)]'*r2;
Proj = ones(N,1)*f .* XXX' + ones(N,1)*c;
D = X(3,:);
@nulledge
nulledge / H36M.ipynb
Last active September 8, 2021 03:39
Description for Human3.6M dataset.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import scipy.io
import numpy as np
FLIC = scipy.io.loadmat('FLIC/examples.mat')
filepath_idx = 1
print(np.squeeze(np.squeeze(FLIC['examples']['filepath'])[filepath_idx]))
print(np.squeeze(np.squeeze(FLIC['examples']['imgdims'])[filepath_idx]))
print(np.squeeze(np.squeeze(FLIC['examples']['istrain'])[filepath_idx]))
coord = {'x': 0, 'y': 1}
print(np.squeeze(np.squeeze(np.squeeze(FLIC['examples'])[filepath_idx])['coords'])[coord['x']][7])
@nulledge
nulledge / ReadOnlyAttrib.cs
Last active December 12, 2017 05:46
Difference between the quaternion and the Euler angle rotation
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ReadOnlyAttribute : PropertyAttribute
{
}
@nulledge
nulledge / tf_gray2color.py
Last active January 19, 2018 05:33
Convert single gray-scale image to color-spectrum image.
class tf_Spectrum:
Color = tf.constant([
[0, 0, 128],
[0, 0, 255],
[0, 255, 0],
[255, 255, 0],
[255, 0, 0]
], dtype = tf.float32)
def tf_gray2color(gray, spectrum = tf_Spectrum.Color):