Skip to content

Instantly share code, notes, and snippets.

@yongjun823
yongjun823 / voxel_split_pointcloud.py
Last active May 28, 2020
point cloud voxel style split
View voxel_split_pointcloud.py
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 Jan 6, 2020
.3dp file viewer + open3d
View app.py
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 Dec 2, 2019
c lang file read & save string in char* array
View simple_cat.c
#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 Nov 4, 2019
semantic segmentation code (from labelme) && semantic json labeling to instance labeling
View ins.py
#!/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 Nov 5, 2019 — forked from goodhamgupta/yolo_to_voc.py
Convert yolo coordinates to VOC format
View label.txt
Apple_porcelain
Beer
Book
Carbonated_drinks
Cup
Dispenser
Desk_lamp
Drugs
Glasses_case
Kettle
View pr_vgg.py
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)
View dd.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View sss.ipynb
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 Jul 28, 2019
공 나와서 부딪히면 끝나는 게임 공 여러개 소환 가능 + 시간 지나면 공 추가
View ballGame.java
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 {
View nltk_mae_test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.