-
Notifications
You must be signed in to change notification settings - Fork 22
Description
First of all, thank you for your efforts to develop nice APIs. To understand lifted multicut, I am now trying to execute two example programs in the Nifty documentation:
‘plot_agglomerative_clustering.py / Agglomerative Clustering on RAG
‘plot_isbi_2012_multicut_2D_simple.py / ISBI 2012 Simple 2D Multicut Pipeline'
http://derthorsten.github.io/nifty/docs/python/html/index.html
I first found that nifty.graph.rag.gridRag should have an additional argument, n_labels, such as:
n_labels = overseg.max()
n_labels = int(n_labels + 1)
rag = nifty.graph.rag.gridRag(overseg, n_labels)
Then, I am stucked at the commands:
nifty.graph.rag.accumulateStandartFeatures
nifty.graph.rag.accumulateMeanAndLength
Their arguments seems to be revised, and I have the errors something like follows:
Traceback (most recent call last):
File "plot_isbi_2012_multicut_2D_simple.py", line 183, in
features = computeFeatures(raw=raw, pmap=pmap, rag=rag)
File "plot_isbi_2012_multicut_2D_simple.py", line 121, in computeFeatures
minVal=0.0, maxVal=255.0, numberOfThreads=1)
TypeError: accumulateStandartFeatures(): incompatible function arguments. The following argument types are supported:
1. (rag: nifty.graph.rag._rag.ExplicitLabelsGridRag2D, data: numpy.ndarray[float32], minVal: float, maxVal: float, blockShape: List[int[2]]=[100, 100], numberOfThreads: int=-1) -> Tuple[numpy.ndarray[float32], numpy.ndarray[float32]]
2. (rag: nifty.graph.rag._rag.ExplicitLabelsGridRag3D32, data: numpy.ndarray[float32], minVal: float, maxVal: float, blockShape: List[int[3]]=[100, 100, 100], numberOfThreads: int=-1) -> Tuple[numpy.ndarray[float32], numpy.ndarray[float32]]
3. (rag: nifty.graph.rag._rag.GridRag3DHdf532, data: nifty::hdf5::Hdf5Array, minVal: float, maxVal: float, blockShape: List[int[3]]=[100, 100, 100], numberOfThreads: int=-1) -> Tuple[numpy.ndarray[uint8], numpy.ndarray[uint8]]
So far, I cannot solve this problem. Could someone kindly give me suggestion or workable/updated sample programs? The nifty module was downloaded from conda-forge repo (v1.0.5, py37hef89d9c_1001).
Sincerely,
Hidetoshi Urakubo