YOLO(darknet)のコンフィグパラメーターについてあまり書かれていないので備忘録。
~.cfgファイルで定義するパラメーター群の一覧になります。
V3でのパラメーター群になります。
畳み込み(conv)だけでなくRNNやLSTMも用意されています。
便宜上オプションのtypeにstringを使っていますが、実態はC言語なのでcharポインターです。
[~]:層の定義(src/parser.c#string_to_layer_typeにパーサーが記述されている)
定義文字列 |
名称 |
shortcut |
ショートカット層 |
crop |
クロップ層 |
cost |
cost層 |
detection |
detection層 |
region |
region層 |
yolo |
yolo層 |
iseg |
iseg層 |
local |
local層 |
convまたはconvolutional |
畳み込み層 |
deconvまたはdeconvolutional |
逆畳み込み層 |
activation |
activation層 |
logistic |
logistic層 |
l2norm |
l2norm層 |
netまたはnetwork |
ネットワーク層 |
crnn |
crnn層 |
gru |
gru層 |
lstm |
lstm層 |
rnn |
rnn層 |
connまたはconnected |
connected層 |
maxまたはmaxpool |
maxpool層 |
reorg |
reorg層 |
avgまたはavgpool |
avgpool層 |
dropout |
dropout層 |
lrnまたはnormalization |
normalization層 |
batchnorm |
batchnorm層 |
softまたはsoftmax |
softmax層 |
route |
route層 |
upsample |
upsample層 |
shortcut層のオプション src/parser.c#parse_shortcut
定義文字列 |
type |
default値 |
from |
int |
|
activation |
string |
linear |
alpha |
float |
|
beta |
float |
|
activationで指定できるのは
logistic
、loggy
、relu
、elu
、selu
、relie
、ramp
、linear
、tanh
、plse
、leaky
、stair
、hardtan
、lhtan
crop層のオプション src/parser.c#parse_crop
定義文字列 |
type |
default値 |
crop_height |
int |
1 |
crop_width |
int |
1 |
flip |
int |
0 |
angle |
float |
0 |
saturation |
float |
1 |
exposure |
float |
1 |
noadjust |
int |
0 |
shift |
float |
0 |
cost層のオプション src/parser.c#parse_cost
定義文字列 |
type |
default値 |
type |
string |
sse |
scale |
float |
1 |
ratio |
float |
0 |
noobj |
float |
1 |
thresh |
float |
0 |
costで指定できるのは
seg
、sse
、masked
、smooth
、L1
、wgan
detection層のオプション src/parser.c#parse_detection
定義文字列 |
type |
default値 |
coords |
int |
1 |
classes |
int |
1 |
rescore |
int |
0 |
num |
int |
1 |
side |
int |
7 |
softmax |
int |
0 |
sqrt |
int |
0 |
max |
int |
90 |
coord_scale |
float |
1 |
forced |
int |
0 |
object_scale |
float |
1 |
noobject_scale |
float |
1 |
class_scale |
float |
1 |
jitter |
float |
2 |
random |
int |
0 |
reorg |
int |
0 |
region層のオプション src/parser.c#parse_region
定義文字列 |
type |
default値 |
coords |
int |
4 |
classes |
int |
20 |
num |
int |
1 |
log |
int |
0 |
sqrt |
int |
0 |
softmax |
int |
0 |
background |
int |
0 |
max |
int |
30 |
jitter |
float |
0.2 |
rescore |
int |
0 |
thresh |
float |
0.5 |
classfix |
int |
0 |
absolute |
int |
0 |
random |
int |
0 |
coord_scale |
float |
1 |
object_scale |
float |
1 |
noobject_scale |
float |
1 |
mask_scale |
float |
1 |
class_scale |
float |
1 |
bias_match |
float |
0 |
tree |
string |
0 |
map |
int |
0 |
anchors |
string |
0 |
yolo層のオプション src/parser.c#parse_yolo
定義文字列 |
type |
default値 |
classes |
int |
20 |
num |
int |
1 |
mask |
int |
0 |
max |
int |
90 |
jitter |
float |
0.2 |
ignore_thresh |
float |
0.5 |
truth_thresh |
float |
0.5 |
random |
int |
0 |
map |
int |
0 |
anchors |
string |
0 |
iseg層のオプション src/parser.c#parse_iseg
定義文字列 |
type |
default値 |
classes |
int |
20 |
ids |
int |
32 |
local層のオプション src/parser.c#parse_local
定義文字列 |
type |
default値 |
filters |
int |
1 |
size |
int |
1 |
stride |
int |
1 |
pad |
int |
0 |
activation |
string |
logistic |
activationで指定できるのは
logistic
、loggy
、relu
、elu
、selu
、relie
、ramp
、linear
、tanh
、plse
、leaky
、stair
、hardtan
、lhtan
conv/convolutional層のオプション src/parser.c#parse_convolutional
定義文字列 |
type |
default値 |
filters |
int |
1 |
size |
int |
1 |
stride |
int |
1 |
pad |
int |
0 |
padding |
int |
0 |
groups |
int |
1 |
activation |
string |
logistic |
batch_normalize |
int |
0 |
binary |
int |
0 |
xnor |
int |
0 |
flipped |
int |
0 |
dot |
float |
0 |
activationで指定できるのは
logistic
、loggy
、relu
、elu
、selu
、relie
、ramp
、linear
、tanh
、plse
、leaky
、stair
、hardtan
、lhtan
deconv/deconvolutional層のオプション src/parser.c#parse_deconvolutional
定義文字列 |
type |
default値 |
filters |
int |
1 |
size |
int |
1 |
stride |
int |
1 |
activation |
string |
logistic |
batch_normalize |
int |
0 |
pad |
int |
0 |
padding |
int |
0 |
activationで指定できるのは
logistic
、loggy
、relu
、elu
、selu
、relie
、ramp
、linear
、tanh
、plse
、leaky
、stair
、hardtan
、lhtan
activation層のオプション src/parser.c#parse_activation
定義文字列 |
type |
default値 |
activation |
string |
linear |
activationで指定できるのは
logistic
、loggy
、relu
、elu
、selu
、relie
、ramp
、linear
、tanh
、plse
、leaky
、stair
、hardtan
、lhtan
logistic層のオプション src/parser.c#parse_logistic
オプションなし
l2norm層のオプション src/parser.c#parse_l2norm
オプションなし
net/network層のオプション src/parser.c#parse_net_options
定義文字列 |
type |
default値 |
batch |
int |
1 |
learning_rate |
float |
.001 |
momentum |
float |
.9 |
decay |
float |
.0001 |
subdivisions |
int |
1 |
time_steps |
int |
1 |
notruth |
int |
0 |
random |
int |
0 |
adam |
int |
0 |
B1 |
float |
.9(ただしadamが指定された場合のみ有効) |
B2 |
float |
.999(ただしadamが指定された場合のみ有効) |
eps |
float |
.0000001(ただしadamが指定された場合のみ有効) |
height |
int |
0 |
width |
int |
0 |
channels |
int |
0 |
inputs |
int |
heightwidthchannels |
max_crop |
int |
width*2 |
min_crop |
int |
width |
max_ratio |
float |
max_crop/width |
min_ratio |
float |
min_crop/width |
center |
int |
0 |
clip |
float |
0 |
angle |
float |
0 |
aspect |
float |
1 |
saturation |
float |
1 |
exposure |
float |
1 |
hue |
float |
0 |
policy |
string |
constant |
burn_in |
int |
0 |
power |
float |
4 |
step |
int |
1(policyがstepまたはsigの場合有効) |
scale |
float |
1(policyがstepの場合のみ有効) |
steps |
string |
(policyがstepsの場合のみ有効) |
scales |
string |
(policyがstepsの場合のみ有効) |
gamma |
float |
1(policyがexpまたはsigの場合有効) |
max_batches |
int |
0 |
policyで指定できるのは
random
、poly
、constant
、step
、exp
、sigmoid
、steps
crnn層のオプション src/parser.c#parse_crnn
定義文字列 |
type |
default値 |
output_filters |
int |
1 |
hidden_filters |
int |
1 |
activation |
string |
logistic |
batch_normalize |
int |
0 |
shortcut |
int |
0 |
activationで指定できるのは
logistic
、loggy
、relu
、elu
、selu
、relie
、ramp
、linear
、tanh
、plse
、leaky
、stair
、hardtan
、lhtan
gru層のオプション src/parser.c#parse_gru
定義文字列 |
type |
default値 |
output |
int |
1 |
batch_normalize |
int |
0 |
tanh |
int |
0 |
lstm層のオプション src/parser.c#parse_lstm
定義文字列 |
type |
default値 |
output |
int |
1 |
batch_normalize |
int |
0 |
rnn層のオプション src/parser.c#parse_rnn
定義文字列 |
type |
default値 |
output |
int |
1 |
activation |
string |
logistic |
batch_normalize |
int |
0 |
shortcut |
int |
0 |
activationで指定できるのは
logistic
、loggy
、relu
、elu
、selu
、relie
、ramp
、linear
、tanh
、plse
、leaky
、stair
、hardtan
、lhtan
conn/connected層のオプション src/parser.c#parse_connected
定義文字列 |
type |
default値 |
output |
int |
1 |
activation |
string |
logistic |
batch_normalize |
int |
0 |
activationで指定できるのは
logistic
、loggy
、relu
、elu
、selu
、relie
、ramp
、linear
、tanh
、plse
、leaky
、stair
、hardtan
、lhtan
max/maxpool層のオプション src/parser.c#parse_maxpool
定義文字列 |
type |
default値 |
stride |
int |
1 |
size |
int |
stride |
padding |
int |
size-1 |
reorg層のオプション src/parser.c#parse_reorg
定義文字列 |
type |
default値 |
stride |
int |
1 |
reverse |
int |
0 |
flatten |
int |
0 |
extra |
int |
0 |
avg/avgpool層のオプション src/parser.c#parse_avgpool
オプションなし
dropout層のオプション src/parser.c#parse_dropout
定義文字列 |
type |
default値 |
probability |
float |
0.5 |
lrn/normalization層のオプション src/parser.c#parse_normalization
定義文字列 |
type |
default値 |
alpha |
float |
0.0001 |
beta |
float |
0.75 |
kappa |
float |
1 |
size |
int |
5 |
batchnorm層のオプション src/parser.c#parse_batchnorm
オプションなし
soft/softmax層のオプション src/parser.c#parse_softmax
定義文字列 |
type |
default値 |
groups |
int |
1 |
temperature |
int |
1 |
tree |
string |
0 |
spatial |
float |
0 |
noloss |
int |
0 |
route層のオプション src/parser.c#parse_route
定義文字列 |
type |
default値 |
layers |
string |
カンマ区切りで複数指定できるためstring(ex:layers = -1, 36) |
upsample層のオプション src/parser.c#parse_upsample
定義文字列 |
type |
default値 |
stride |
int |
2 |
scale |
float |
1 |