Blueoil の LMFYolo でより小さいオブジェクトも検出したい場合、 添付したソースコードのように変更を施すことで、グリッドセルのサイズを変更することができます。
ソースコードのパスは Blueoil の v0.21.0 に従います。
以下の3つのソースコードを diff に示したように書き換えます。
- blueoil/networks/object_detection/lm_fyolo.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) |
$ 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 |
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 |
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 |
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 |
# 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 |
# 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 |