Commit 58d26112 authored by Jiri Borovec's avatar Jiri Borovec

update for mtg

parent 28ce07d7
......@@ -141,7 +141,6 @@ def estimateAtlasGraphCut_simple (imgs, encodding, pCoef=1.) :
# reshape labels
labels = labels.reshape( labelingSum.shape[:2] )
logger.debug('resulting labelling {}: \n{}'.format(labels.shape, labels))
return labels
......@@ -158,7 +157,7 @@ def estimateAtlasGraphCut_general (imgs, encodding, pCoef=1., initLbs=None) :
edges = getEdgesImagePlane( unaryCost.shape[:2] )
logger.debug('edges for image plane are shape {}'.format(edges.shape))
edge_weights = np.zeros( edges.shape[0] )
edge_weights = np.ones( edges.shape[0] )
logger.debug('edges weights are shape {}'.format(edge_weights.shape))
# original and the right way...
......@@ -177,7 +176,6 @@ def estimateAtlasGraphCut_general (imgs, encodding, pCoef=1., initLbs=None) :
# reshape labels
labels = labels.reshape( unaryCost.shape[:2] )
logger.debug('resulting labelling {}'.format(labels.shape))
return labels
......
......@@ -24,9 +24,9 @@ def experiment_pipelineALPE (atlas, imgs, encoding) :
pOut = os.path.join('..','..','output')
DL.pipeline_estimAtlasLearningPatternWeights(imgs, initAtlas=initAtlas_msc, maxIter=9, reInit=False, outDir=pOut, outPrefix='d1')
DL.pipeline_estimAtlasLearningPatternWeights(imgs, initAtlas=initAtlas_org, maxIter=9, reInit=False, outDir=pOut, outPrefix='d1')
# _ = input('wait')
DL.pipeline_estimAtlasLearningPatternWeights(imgs, initAtlas=initAtlas_msc, maxIter=9, reInit=True, outDir=pOut, outPrefix='d2')
DL.pipeline_estimAtlasLearningPatternWeights(imgs, initAtlas=initAtlas_org, maxIter=9, reInit=True, outDir=pOut, outPrefix='d2')
# DL.pipeline_estimAtlasLearningPatternWeights(imgs, initEncode=initEncode_rnd, outDir=pOut)
return None
......@@ -89,9 +89,9 @@ if __name__ == "__main__":
# test_encoding(atlas, imgs, encoding)
# test_atlasLearning(atlas, imgs, encoding)
# test_simpleCase()
test_simpleCase()
main()
# main()
logger.info('DONE')
plt.show()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment