forked from shsun-xq/TreeSegNet
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtrain.py
More file actions
52 lines (43 loc) · 1.3 KB
/
train.py
File metadata and controls
52 lines (43 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from lib import *
import sys,os
import lib
from lib import dicto, glob, getArgvDic,filename
from lib import show, loga, logl, imread, imsave
from configManager import (getImgGtNames, indexOf, readgt, readimg,
setMod, togt, toimg, makeTrainEnv)
from config import c, cf
setMod('train')
from configManager import args
args.names = getImgGtNames(c.names)[:]
args.prefix = c.weightsPrefix
args.classn = 6
#args.window = (64*10,64*10)
args.window = (64*8,64*8)
#args.window = (64*1,64*1)
[ 20. , 29.96875]
# =============================================================================
# config BEGIN
# =============================================================================
args.update(
# batch=8,
# batch=1,
batch=2, #4G*2
# batch=4, #8G*2
# epoch=50,
epoch=80,
resume=0,
epochSize = 10000,
)
# =============================================================================
# config END
# =============================================================================
argListt, argsFromSys = getArgvDic()
args.update(argsFromSys)
makeTrainEnv(args)
c.args=(args)
if __name__ == '__main__':
import trainInterface as train
train.train()
pass