Skip to content

Instantly share code, notes, and snippets.

View SeungBack's full-sized avatar

Seunghyeok Back SeungBack

View GitHub Profile
import imageio
import numpy as np
import pyfastnoisesimd as fns # pip install pyfastnoisesimd
import matplotlib.pyplot as plt
def perlin_noise(frequency, width, height):
noise = fns.Noise()
noise.NoiseType = 2 # perlin noise
@SeungBack
SeungBack / create_uoais_annotation.py
Created June 24, 2022 06:36
create_uoais_annotation
import os
import cv2
import numpy as np
from tqdm import tqdm
import glob
import json
from pycocotools import mask as m
import datetime
@SeungBack
SeungBack / convert obj to ply.md
Last active March 12, 2024 09:11
How to convert .obj to .ply, with colored vertices and triangular faces

How to convert .obj to .ply, with colored vertices and triangular faces

  1. open the meshlab and import *.obj file
  2. centralize the mesh
Filters -> Normals, Curvatures and Orientations ->
Transform: Move, Translate, Center -> 
check translate center of bbox to the origin -> Apply
  1. subdivide mesh
@SeungBack
SeungBack / converct_VOC_to_mask.py
Last active September 17, 2019 01:37
converct_VOC_to_mask
# read VOC style segmentation labels (.xml) and convert them to gray masked image(.jpg)
# reference: http://www.programmersought.com/article/9208990502/
import os
import cv2
import xml.dom.minidom
image_path = "/home/seung/Dropbox/Project/IKEA-Assembly-Instuctions-Dataset/supervisely/chair/img/"
annotation_path = "/home/seung/Annotations_step/"