Skip to content

Instantly share code, notes, and snippets.

View Taehun's full-sized avatar
👋
Hello world

Taehun Kim Taehun

👋
Hello world
View GitHub Profile
@Taehun
Taehun / vimrc
Last active June 27, 2022 08:13
vimrc
set tabstop=4
set shiftwidth=4
set expandtab
set softtabstop=4
"=== For linux kernel ===
"set noexpandtab
"set tabstop=8
"set shiftwidth=8
"set softtabstop=8
@Taehun
Taehun / nf.c
Created October 9, 2012 01:08
Linux Kernel Module Example: Netfilter
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/netfilter_ipv4.h>
#include <linux/skbuff.h>
#include <linux/udp.h>
#include <linux/ip.h>
/* This function to be called by hook. */
static unsigned int
hook_func(unsigned int hooknum,
@Taehun
Taehun / pcap_exam.c
Created April 26, 2012 19:30
libpcap example code
#include <pcap.h>
#include <net/ethernet.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
@Taehun
Taehun / yolov4x-mish.cfg
Last active December 2, 2021 15:39
yolov4x-mish Configuration file for BDD100K
[net]
batch=64
subdivisions=16
width=416
height=416
channels=3
momentum=0.949
decay=0.0005
angle=0
saturation = 1.5
@Taehun
Taehun / train_val_txt.py
Last active November 4, 2021 18:32
Python script to generate Darknet 'train.txt' and 'val.txt' file
# source> https://github.com/yogeshgajjar/BDD100k-YOLOV3-tiny/blob/master/utils/test_val_txt.py
import pickle
import os, argparse
from os import listdir, getcwd
from os.path import join
def create_train(train_img_path):
"""
Creates the .txt file which contains the entire path of the training image file. This file is required to be added in the
@Taehun
Taehun / bdd100k.data
Created November 4, 2021 18:15
Darknet BDD100K data file
classes = 10
train = train.txt
valid = test.txt
names = bdd100k.names
backup = backup/
@Taehun
Taehun / bdd100k.names
Created October 18, 2021 08:36
BDD100K class names for Darknet
car
bus
person
bike
truck
motor
train
rider
traffic sign
traffic light
@Taehun
Taehun / label_to_txt.py
Last active October 4, 2021 14:26
BDD100K label to Darknet label
# source> https://github.com/yogeshgajjar/BDD100k-YOLOV3-tiny/blob/master/utils/label_to_txt.py
import argparse
import json
from pathlib import Path
LABEL_MAP = {
"car": 0,
"bus": 1,
"person": 2,
"bike": 3,
@Taehun
Taehun / aimmo_dataset.patch
Last active July 28, 2021 04:57
Add AIMMO dataset to DDRNet.pytorch
From 53ed3d93263ae734ea2b09607b2769454924ad1e Mon Sep 17 00:00:00 2001
From: Taehun Kim <kth3321@gmail.com>
Date: Wed, 28 Jul 2021 13:53:33 +0900
Subject: [PATCH] Add AIMMO dataset
---
lib/datasets/__init__.py | 11 +++---
lib/datasets/aimmo.py | 78 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 83 insertions(+), 6 deletions(-)
create mode 100644 lib/datasets/aimmo.py
@Taehun
Taehun / ddrnet23_slim.yaml
Created July 27, 2021 05:45
DDRNet23_slim default configurations
CUDNN:
BENCHMARK: true
DETERMINISTIC: false
ENABLED: true
GPUS: (0,1)
OUTPUT_DIR: 'output'
LOG_DIR: 'log'
WORKERS: 4
PRINT_FREQ: 10