Skip to content

Instantly share code, notes, and snippets.

View kingsj0405's full-sized avatar
🏠
Working at home

Sejong Yang kingsj0405

🏠
Working at home
View GitHub Profile
@kingsj0405
kingsj0405 / compare-face.py
Created March 21, 2019 03:30
Compare face image
"""
This program is wrapper of face_recognition on the following link
https://github.com/ageitgey/face_recognition
You need to install followings
- Python3.3+ or Python2.7
- dlib
- face_recognition
For more information visit ageithey/face_recognition
@kingsj0405
kingsj0405 / extract-all-zip.sh
Last active October 22, 2020 03:14
Ubuntu useful bash script
#!/bin/sh
# From following link
# https://stackoverflow.com/a/29248777/6322404
for zip in *.zip
do
dirname=`echo $zip | sed 's/\.zip$//'`
if mkdir "$dirname"
then
if cd "$dirname"
then
@kingsj0405
kingsj0405 / vgg_feature_extractor.py
Last active February 3, 2021 05:48 — forked from alper111/vgg_perceptual_loss.py
PyTorch implementation of VGG perceptual loss
# Forked from vgg perceptual loss
# https://gist.github.com/alper111/8233cdb0414b4cb5853f2f730ab95a49
import torch
import torchvision
class VGGFeatureExtractor(torch.nn.Module):
def __init__(self, resize=True):
super(VGGFeatureExtractor, self).__init__()
blocks = []
@kingsj0405
kingsj0405 / extract_ILSVRC.sh
Created February 10, 2020 11:16 — forked from BIGBALLON/extract_ILSVRC.sh
script for ImageNet data extract.
#!/bin/bash
#
# script to extract ImageNet dataset
# ILSVRC2012_img_train.tar (about 138 GB)
# ILSVRC2012_img_val.tar (about 6.3 GB)
# make sure ILSVRC2012_img_train.tar & ILSVRC2012_img_val.tar in your current directory
#
# https://github.com/facebook/fb.resnet.torch/blob/master/INSTALL.md
#
# train/

Result

(venv) root@host:path/FFHQ# python convert_lmdb1024_list256.py
70000it [14:16, 81.68it/s]________________________________________________________________________________________________________________________________________________________________________________________________________________________________| 69997/70000 [14:16<00:00, 26.75it/s]
100%|_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________| 70000/70000 [14:16<00:00, 81.68it/s]

convert_ffhq_lmdb1024_dir256_multiprocessing_tqdm_htop

@kingsj0405
kingsj0405 / align-crop-face-oxford-IIIT-Pet-Dataset.md
Last active September 28, 2021 02:40
The Oxford-IIIT Pet Dataset

The oxford-IIIT Pet Dataset

Homepage

Annotations Examples

Download and extraction

Run provided download.sh

@kingsj0405
kingsj0405 / check_cnt_of_pep.js
Last active August 23, 2022 14:56
연세대학교 관련 스크립트
// 신청인원 보고서
// 신청내역 나오는 화면에서 콘솔(F12) 열어서
var data_my_mil;
var finished1 = false;
var finished2 = false;
function call_data(){
call_data2();
jQuery('table').fadeTo('fast',0.5);
finished1 = false;
@kingsj0405
kingsj0405 / latency.markdown
Created September 22, 2022 04:06 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@kingsj0405
kingsj0405 / iframe-github.md
Created May 14, 2020 03:06 — forked from lostsh/iframe-github.md
Iframe gist