In this example we use valid padding convolutional UNet, that means that the coloring procedure can be used in fully convolutional style.
python train_cvppp.py path_to_biological
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=100, 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=5.,
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