Skip to content

Instantly share code, notes, and snippets.

View jangsoopark's full-sized avatar
:octocat:
asdf

jangsoo park jangsoopark

:octocat:
asdf
View GitHub Profile
@jangsoopark
jangsoopark / face-detection.py
Created June 29, 2022 07:23 — forked from hiorws/face-detection.py
Using python opencv to detect face and send the frames to FFmpeg to create HLS(HTTP Live Streaming)
import numpy as np
import cv2
import sys
cap = cv2.VideoCapture(0)
face_cascade = cv2.CascadeClassifier('<PATH_TO_CASCADES_FOLDER>/haarcascade_frontalface_default.xml')
while(True):
# Capture frame-by-frame
@jangsoopark
jangsoopark / main.cpp
Created April 13, 2022 08:27 — forked from YashasSamaga/main.cpp
YOLOv4 OpenCV Performance Evaluation
// https://github.com/AlexeyAB/darknet/wiki/How-to-evaluate-accuracy-and-speed-of-YOLOv4
// g++ -I/usr/local/include/opencv4/ main.cpp -lopencv_core -lopencv_imgproc -lopencv_dnn -lopencv_imgcodecs -O3 -std=c++17 -lstdc++fs
#include <iostream>
#include <queue>
#include <iterator>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <chrono>
// 소스출처 : http://www.kma.go.kr/weather/forecast/digital_forecast.jsp 내부에 있음
// 기상청에서 이걸 왜 공식적으로 공개하지 않을까?
//
// (사용 예)
// var rs = dfs_xy_conv("toLL","60","127");
// console.log(rs.lat, rs.lng);
//
<script language="javascript">
//<!--
@jangsoopark
jangsoopark / pc2voxel.py
Created February 4, 2022 04:43 — forked from justanhduc/pc2voxel.py
PyTorch pointcloud to voxel
import neuralnet_pytorch as nnt
import torch as T
from torch_scatter import scatter_add
def pointcloud2voxel_fast(pc: T.Tensor, voxel_size: int, grid_size=1., filter_outlier=True):
b, n, _ = pc.shape
half_size = grid_size / 2.
valid = (pc >= -half_size) & (pc <= half_size)
valid = T.all(valid, 2)
@jangsoopark
jangsoopark / torch-mnist-pull-3498.ipynb
Created March 4, 2021 08:00
torch-mnist-pull-3498.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from PIL import Image
import glob
import os
original_label_dir = '{YOLO DATASET PATH}'
image_dir = '{PNG IMAGE DIR}'
label_dir = '{KITTI TYPE LABEL PATH}'
2.5 2.4
0.5 0.7
2.2 2.9
1.9 2.2
3.1 3.0
2.3 2.7
2 1.6
1 1.1
1.5 1.6
1.1 0.9
import scipy.ndimage as ndimage
import cv2
import numpy as np
def generate_dct(n):
m = np.zeros((n, n))
for i in range(n):
for j in range(n):
m[i, j] = np.sqrt(2 / n) * np.cos((np.pi / n) * (i + 0.5) * (j + 0.5))
#include <iostream>
#include "pipeline/manager.h"
#include "video/analyze.h"
#include "probes.h"
int main(int argc, char** argv)
cmake_minimum_required(VERSION 3.5)
project(live555 C CXX)
include_directories(
BasicUsageEnvironment/include
groupsock/include
liveMedia/include
UsageEnvironment/include
)