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 / 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
@Taehun
Taehun / category_per_class.patch
Created July 13, 2021 08:25
Add mAP for category per class to pycocotools
--- cocoeval.py 2021-07-13 17:17:22.000000000 +0900
+++ cocoeval_new.py 2021-07-13 17:21:29.000000000 +0900
@@ -494,6 +494,157 @@
def __str__(self):
self.summarize()
+
+ # add for per category metric from here
+ def summarize_per_category(self):
+ '''
@Taehun
Taehun / get_model_list.py
Created July 8, 2021 07:29
AzureML 웹 서비스에서 배포된 모델 목록 가져오기
from azureml.core import Webservice, Workspace
ws = Workspace.from_config()
service_name = "custom-bbox-svc"
service = Webservice(ws, service_name)
service_info = service.serialize()
custom_models = [m_info["id"] for m_info in service_info["modelDetails"]]
print(custom_models)
@Taehun
Taehun / deeplab_pb_to_saved.py
Created January 29, 2021 01:04
DeepLab frozen graph to saved model
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
from tensorflow.python.saved_model import signature_constants
from tensorflow.python.saved_model import tag_constants
export_dir = './saved'
graph_pb = 'frozen_inference_graph.pb'
builder = tf.saved_model.builder.SavedModelBuilder(export_dir)