Skip to content

Instantly share code, notes, and snippets.

View Hyuto's full-sized avatar
💭
Tidur

Wahyu Setianto Hyuto

💭
Tidur
View GitHub Profile
@Hyuto
Hyuto / video-cutter.py
Last active April 13, 2021 16:33
Cut video using python from terminal
# Created by Hyuto, 2021
# Usage:
# - python video-cutter.py VIDEO-PATH END-TIME
# - python video-cutter.py VIDEO-PATH -s=START-TIME -e=END-TIME
import sys, os, subprocess, logging
try:
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
except:
@Hyuto
Hyuto / add-nms.py
Last active December 7, 2022 16:26
Add Non Max Suppression (NMS) operator to YOLOv5 onnx model.
"""Add NMS on YOLOv5 onnx models.
Usage:
$ python add-nms.py --model <YOLOv5-MODEL>.onnx
Install Dependencies:
$ pip install numpy onnx onnxruntime onnxsim
$ pip install onnx_graphsurgeon --index-url https://pypi.ngc.nvidia.com
"""
import argparse
@Hyuto
Hyuto / custom-nas-model-metadata.py
Last active March 16, 2024 17:40
Generate metadata from custom trained YOLO-NAS model to help achieve best performance on inferencing with ONNX.
"""
custom-nas-model-metadata.py
Generate metadata from custom trained YOLO-NAS model to help achieve best performance
on inferencing with ONNX.
Usage:
$ python custom-nas-model-metadata.py -m <CHECKPOINT-PATH> \ # Custom trained YOLO-NAS checkpoint path
-t <MODEL-TYPE> \ # Custom trained YOLO-NAS model type
-n <NUM-CLASSES> # Number of classes