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 torch | |
import torch.nn as nn | |
import numpy as np | |
import torch.nn.functional as F | |
class STN3d(nn.Module): | |
def __init__(self): | |
super(STN3d, self).__init__() | |
self.conv1 = torch.nn.Conv1d(3, 64, 1) |
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
#!/usr/bin/env python | |
# -*- coding:UTF-8 -*- | |
# File Name : xyz2uvd.py | |
# Creation Date : 26-07-2018 | |
# Created By : Jeasine Ma [jeasinema[at]gmail[dot]com] | |
from pyquaternion import Quaternion | |
import numpy as np | |
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
#! /usr/bin/env python | |
# coding=utf-8 | |
__author__ = 'kingson_jeasinema' | |
import sys | |
import alfred | |
import requests | |
headers = { |
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 torch | |
from torchvision import transforms | |
import cv2 | |
import numpy as np | |
import types | |
from numpy import random | |
def intersect(box_a, box_b): | |
max_xy = np.minimum(box_a[:, 2:], box_b[2:]) |
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 os | |
import numpy as np | |
import h5py as h5 | |
from scipy.misc import imread | |
from struct import pack, unpack | |
import IPython | |
import math | |
# Extract pointcloud from rgb-d, then convert it into obj coordinate system(tsdf/poisson reconstructed object) | |
# In fact, merged_cloud.ply is exactly composed by pointclouds that transformed into this coordinate 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 numpy as np | |
def main_mxnet(): | |
import mxnet as mx | |
from mxnet import gluon, autograd | |
from mxnet.gluon import nn | |
net = nn.Sequential() | |
with net.name_scope(): |
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
#!/usr/bin/env python | |
# -*- coding:UTF-8 -*- | |
# File Name : split_draw.py | |
# Purpose : | |
# Creation Date : 09-05-2018 | |
# Last Modified : 2018年05月09日 星期三 21时06分55秒 | |
# Created By : Jeasine Ma [jeasinema[at]gmail[dot]com] | |
import numpy as np |
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 argparse | |
import os | |
import time | |
import random | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torch.optim as optim | |
from torch.utils.data import Dataset |
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
#!/usr/bin/env python | |
# -*- coding:UTF-8 -*- | |
# File Name : face_morphing.py | |
# Creation Date : 04-04-2018 | |
# Created By : Jeasine Ma [jeasinema[at]gmail[dot]com] | |
import cv2 | |
import json | |
import numpy as np |
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 torch | |
import torch.nn.functional as F | |
from torch.nn.parameter import Parameter | |
import numpy as np | |
class SpatialSoftmax(torch.nn.Module): | |
def __init__(self, height, width, channel, temperature=None, data_format='NCHW'): | |
super(SpatialSoftmax, self).__init__() | |
self.data_format = data_format |