Skip to content

Instantly share code, notes, and snippets.

@yongjun823
yongjun823 / voxel_split_pointcloud.py
Last active May 28, 2020 01:51
point cloud voxel style split
import numpy as np
from itertools import product
# voxel range
range_size = 11
x_lin = np.linspace(-1.5, 1.5, range_size)
y_lin = np.linspace(-1.5, 1.5, range_size)
z_lin = np.linspace(-1.5, 1.5, range_size)
@yongjun823
yongjun823 / app.py
Last active January 6, 2020 06:49
.3dp file viewer + open3d
import numpy as np
import open3d as o3d
if __name__ == "__main__":
object_txt = np.loadtxt('myfile.3dp')
points = object_txt[:, 2:5]
colors = object_txt[:, 5:] / 255
pcd = o3d.geometry.PointCloud()
@yongjun823
yongjun823 / simple_cat.c
Created December 2, 2019 07:04
c lang file read & save string in char* array
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void read(char** sample, char* file_name)
{
FILE* fp;
int i = 0;
fp = fopen(file_name, "r");
@yongjun823
yongjun823 / ins.py
Created November 4, 2019 02:12
semantic segmentation code (from labelme) && semantic json labeling to instance labeling
#!/usr/bin/env python
from __future__ import print_function
import argparse
import glob
import json
import os
import os.path as osp
import sys
@yongjun823
yongjun823 / label.txt
Last active November 5, 2019 10:38 — forked from goodhamgupta/yolo_to_voc.py
Convert yolo coordinates to VOC format
Apple_porcelain
Beer
Book
Carbonated_drinks
Cup
Dispenser
Desk_lamp
Drugs
Glasses_case
Kettle
@yongjun823
yongjun823 / pr_vgg.py
Created September 18, 2019 11:27
PRSRGAN test
import torch
import torch.nn as nn
import torchvision.models as models
from pprint import pprint
class Net(nn.Module):
def __init__(self):
super().__init__()
model = models.vgg19(pretrained=False)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yongjun823
yongjun823 / ballGame.java
Created July 28, 2019 11:49
공 나와서 부딪히면 끝나는 게임 공 여러개 소환 가능 + 시간 지나면 공 추가
package com.company;
import java.awt.*;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.util.ArrayList;
public class Report2 extends Frame implements WindowListener, KeyListener, Runnable {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.