Skip to content

Instantly share code, notes, and snippets.

View PINTO0309's full-sized avatar
🤣
I may be slow to respond.

Katsuya Hyodo PINTO0309

🤣
I may be slow to respond.
View GitHub Profile
@motokimura
motokimura / quantization_error_simulation_of_silu.ipynb
Created March 21, 2023 06:58
Quantization error simulation of SiLU (Swish) activation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ksasao
ksasao / camera.ino
Last active March 22, 2023 13:18
Spresense の HDRカメラの画像を表示するサンプルコードです。Spresense メインボードとカメラだけで動作します。拡張ボードは不要です。https://twitter.com/ksasao/status/1521667631061037056
/*
* camera.ino - Simple camera example sketch
* Copyright 2018, 2022 Sony Semiconductor Solutions Corporation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
images = np.zeros((1, 3, 360, 640), dtype=np.float32)
masks = np.ones((1, 1, 360, 640), dtype=np.float32)
torch.onnx.export(nnet.model,
(images, masks),
"model_float32.onnx",
export_params=True,
opset_version=11,
do_constant_folding=True,
input_names = ['input_rgb','input_mask'],
@UnaNancyOwen
UnaNancyOwen / README.md
Last active January 19, 2024 07:00
OpenCV ObjDetect Module Face Recognition (SFace) Sample

OpenCV ObjDetect Module Face Recognition (SFace) Sample

    1. Generate Aligned Faces
    python generate_aligned_faces.py image.jpg
    
    • Input
      input
@kounoike
kounoike / Dockerfile
Created January 2, 2021 18:49
UniverseNet+manga109
ARG PYTORCH="1.5"
ARG CUDA="10.1"
ARG CUDNN="7"
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0+PTX"
ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
ENV CMAKE_PREFIX_PATH="$(dirname $(which conda))/../"
@NobuoTsukamoto
NobuoTsukamoto / export_tfv2_lite_models.ipynb
Last active January 7, 2022 06:54
export_tfv2_lite_models.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tomoaki0705
tomoaki0705 / text.md
Last active May 12, 2024 07:20
「OpenCVの画像処理をGPU(CUDA)で高速化する」を読んでresizeをマルチコア対応するお話。

はじめに

OpenCVでの処理(リサイズなど)を、簡単にマルチコア化する方法をどなたかご存知でしたら教えて頂けないでしょうか? TBBを使ってスレッドを作る方法は色々見つかったのですが、単にcv::resize()をマルチコア動作で高速化させたいです。

TL;DR

  • Python バインディングが遅い
  • OpenCV の resize はずっと昔からマルチコア対応している
@bmabir17
bmabir17 / convert.py
Last active February 6, 2022 20:54
Converts the mask-rcnn keras model https://github.com/matterport/Mask_RCNN/releases/tag/v2.0 to tflite
import tensorflow as tf
import numpy as np
import mrcnn.model as modellib # https://github.com/matterport/Mask_RCNN/
from mrcnn.config import Config
import keras.backend as keras
PATH_TO_SAVE_FROZEN_PB ="./"
FROZEN_NAME ="saved_model.pb"
@NobuoTsukamoto
NobuoTsukamoto / keras-post-training-quantization.ipynb
Last active June 28, 2020 17:23
Keras Post-training quantization.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.