This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: |