In this example we use zero_padding convolutional UNet, that means that the coloring procedure will use the knowledge about borders to do coloring.
python train_cvppp.py path_to_A1_dataset
Creates a batch generator
generator = train_data.create_batch_generator(30, transforms=transforms)
Creates a halo region function
mask_builder = dc.build_halo_mask(fixed_depth=30, margin=21, min_fragment=10)
- fixed_depth - maximum number of object in a training batch
- margin - size of margin (dilatation) around the object sould be odd
- min_fragment - minimal size of an object in pixels
Training
model, errors = dc.train(generator=generator,
model=net,
mask_builder=mask_builder,
niter=10000,
k_neg=7.,
lr=1e-3,
caption=join(directory, "model"))
- generator - batch generator
- model - segmentation network
- niter - number of iterations
- k_neg - balance between positive and negative parts of loss please seen paper
- lr - learining rate
- caption - name of errors file and model