Skip to content

Instantly share code, notes, and snippets.

View iizukak's full-sized avatar
🙆‍♂️

Kentaro Iizuka iizukak

🙆‍♂️
View GitHub Profile
@iizukak
iizukak / genosslist.py
Created September 15, 2020 01:04
genosslist.py
import os
import csv
import requests
with open("./requirements.txt") as f:
osslist = [s.strip() for s in f.readlines()]
for oss in osslist:
name, var = oss.split("==")
url = "https://pypi.org/pypi/{0}/{1}/json".format(name, var)
@iizukak
iizukak / gist:f60f4329328dc52c1c50a9e9f3fdad6d
Last active May 5, 2020 13:47
mruby 84aad399 rake -v error on macOS
$ rake -v [~/projects/mruby]
mkdir -p /Users/kentaro/projects/mruby/build/host/src
gcc -std=gnu99 -g -O3 -Wall -Wundef -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wwrite-strings -I"/Users/kentaro/projects/mruby/include" -MMD -o "/Users/kentaro/projects/mruby/build/host/src/object.o" -c "/Users/kentaro/projects/mruby/src/object.c"
mkdir -p /Users/kentaro/projects/mruby/build/host/src
gcc -std=gnu99 -g -O3 -Wall -Wundef -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wwrite-strings -I"/Users/kentaro/projects/mruby/include" -MMD -o "/Users/kentaro/projects/mruby/build/host/src/kernel.o" -c "/Users/kentaro/projects/mruby/src/kernel.c"
mkdir -p /Users/kentaro/projects/mruby/build/host/src
gcc -std=gnu99 -g -O3 -Wall -Wundef -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wwrite-st
@iizukak
iizukak / fer2013_mobilenet_small.txt
Created April 24, 2020 00:28
FER2013 Mobilenet Small Benchmark
Benchmark model: mobilenet_small
Benchmark for non quantized model
LOAD DATASET: START
LOAD DATASET: DONE
INFERENCE: START
INFERENCE: DONE
Angry: Correct cases: 271 / 491, Accuracy: 55.19
Disgust: Correct cases: 0 / 55, Accuracy: 0.00
@iizukak
iizukak / mobilenet_small_bench.txt
Created April 14, 2020 23:56
TensorFlow Lite quantization benchmark
STARTING!
Duplicate flags: num_threads
Min num runs: [50]
Min runs duration (seconds): [1]
Max runs duration (seconds): [150]
Inter-run delay (seconds): [-1]
Num threads: [1]
Benchmark name: []
Output prefix: []
Min warmup runs: [1]
Number of nodes executed: 16
============================== Summary by node type ==============================
[Node type] [count] [avg ms] [avg %] [cdf %] [mem KB] [times called]
CONV_2D 3 13.541 85.346% 85.346% 0.000 3
DEPTHWISE_CONV_2D 7 1.808 11.395% 96.741% 0.000 7
FULLY_CONNECTED 2 0.458 2.887% 99.628% 0.000 2
MEAN 1 0.043 0.271% 99.899% 0.000 1
QUANTIZE 2 0.015 0.095% 99.994% 0.000 2
SOFTMAX 1 0.001 0.006% 100.000% 0.000
@iizukak
iizukak / gist:703d10d5fc975517b820709a9e75115a
Last active April 14, 2020 14:09
FER2013 quantize result
Benchmark model: mobilenet_small
Benchmark for non quantized model
LOAD DATASET: START
LOAD DATASET: DONE
INFERENCE: START
INFERENCE: DONE
Angry: Correct cases: 301 / 491, Accuracy: 61.30
Disgust: Correct cases: 0 / 55, Accuracy: 0.00
@iizukak
iizukak / howto.md
Last active March 25, 2020 00:31
LMFYolo のグリッドセルのサイズを拡大する

LMFYolo のグリッドセルサイズを拡大する方法

Blueoil の LMFYolo でより小さいオブジェクトも検出したい場合、 添付したソースコードのように変更を施すことで、グリッドセルのサイズを変更することができます。

ソースコードのパスは Blueoil の v0.21.0 に従います。

以下の3つのソースコードを diff に示したように書き換えます。

  • blueoil/networks/object_detection/lm_fyolo.py
# Basic tests
## Test of openimagesv4_object_detection
### ./blueoil.sh init
OK!
### diff ./tmp/tests/20190709101142/created_by_test_script_openimagesv4_object_detection.yml ./tests/config/openimagesv4_object_detection.yml
OK!
### ./blueoil.sh train ./tmp/tests/20190709101142/created_by_test_script_openimagesv4_object_detection.yml
OK!
### ./blueoil.sh convert ./tmp/tests/20190709101142/created_by_test_script_openimagesv4_object_detection.yml ./saved/created_by_test_script_openimagesv4_object_detection_20190709101155
OK!
Sky
Building
Column_Pole
Road
Sidewalk
Tree
SignSymbol
Fence
Car
Pedestrian
@iizukak
iizukak / pins.pcf
Last active March 14, 2019 07:57
TinyFPGA BX User IO Output Example
# Left side of board
set_io --warn-no-port io_pin_1 A2
set_io --warn-no-port io_pin_2 A1
set_io --warn-no-port io_pin_3 B1
set_io --warn-no-port io_pin_4 C2
set_io --warn-no-port io_pin_5 C1
set_io --warn-no-port io_pin_6 D2
set_io --warn-no-port io_pin_7 D1
set_io --warn-no-port io_pin_8 E2
set_io --warn-no-port io_pin_9 E1