另外,ref:fcn voc-fcn32s training 手起刀落
clone 下來,root folder 有 surgery.py,就是把 fully connected layer 的 parameters 裁剪成 fully convolution layer 的樣子。
所以先用 ssd - fully connected layer train 到收斂後,用 surgery.py 裁出可用的部份,作為 FCN 的 pretrained parameters
先拿 train.prototxt 來看.
第一層的data 層:
layer { name: "data" type: "Python" top: "data" top: "label" python_param { module: "voc_layers" layer: "SBDDSegDataLayer" param_str: "{\'sbdd_dir\': \'../data/sbdd/dataset\', \'seed\': 1337, \'split\': \'train\', \'mean\': (104.00699, 116.66877, 122.67892)}" } }data input 層會call voc_layer.py 中的 SBDSegDataLayer 這個 function,並且會把 param_str 傳入...
現在用的是 SBDSegDataLayer.他的 setup( ) 的comment:
""" Setup data layer according to parameters: - sbdd_dir: path to SBDD `dataset` dir - split: train / seg11valid - mean: tuple of mean values to subtract - randomize: load in random order (default: True) - seed: seed for randomization (default: None / current time) for SBDD semantic segmentation. N.B.segv11alid is the set of segval11 that does not intersect with SBDD. Find it here: https://gist.github.com/shelhamer/edb330760338892d511e. example params = dict(sbdd_dir="/path/to/SBDD/dataset", mean=(104.00698793, 116.66876762, 122.67891434), split="valid") """配合上面的 train.prototxt 的 param_str 來看..
{ \'sbdd_dir\': \'../data/sbdd/dataset\', \'seed\': 1337, \'split\': \'train\', \'mean\': (104.00699, 116.66877, 122.67892) }知道 data 在 ../data/sbdd/ 下..
沒有留言:
張貼留言