Skip to content

Instantly share code, notes, and snippets.

View se7oluti0n's full-sized avatar

Manh Truong Tuan se7oluti0n

View GitHub Profile
@se7oluti0n
se7oluti0n / decorator.cpp
Created April 13, 2018 08:38 — forked from lizhongz/decorator.cpp
C++ decorator measuring the execution time of a function
#include <functional>
#include <chrono>
#include <iostream>
template <class> struct ExeTime;
// Execution time decorator
template <class R, class... Args>
struct ExeTime<R(Args ...)> {
public:
name: "RHDLatentHMMap"
#-----Generate random image index for training 0
layer {
name: "image_index_0"
type: "DeepHandModelGenRandIndex"
top: "image_index_0"
gen_rand_index_param {
index_lower_bound: 0
index_upper_bound: 10000
@se7oluti0n
se7oluti0n / ffmpeg.md
Created December 18, 2024 09:08 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@se7oluti0n
se7oluti0n / onnx_fps_benchmark.py
Created April 25, 2025 06:59
Snippet to measure FPS for ONNX
import onnxruntime as ort
import numpy as np
import time
import argparse
import os
def parse_args():
parser = argparse.ArgumentParser(description="Benchmark FPS for an ONNX model.")
parser.add_argument("--model-path", type=str, default="model.onnx",
help="Path to the ONNX model file (default: model.onnx)")