-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with sample programs in the Nifty documentation #137
Comments
I think the issue is that |
Thanks you for prompt reply. Indeed, they both worked by just adding “.astype(‘float32’)” !
This occurred at the following part: The contents of the arguments were: Also, in the case of plot_agglomerative_clustering.py, I saw the following:
Excuse me for the flood of thoughtless questions, but I believe they help someone else. Hidetoshi |
About the first issue:
About the second issue:
|
Thanks! They almost work. Additionally, I saw the following
I also saw the following at Line 77 in "plot_agglomerative_clustering.py."
The object "rag" ExplicitLabelsGridRag2D seems to be converted into numpy.ndarray[uint32]. I guess, some attribute function provides this functionality ... Probably they are last questions. Thank you for your patience. I will upload the revised programs if they work! Sincerely, |
Yes, that is the same issue that you brought up in the question before. The problem here is that
This is the wrong function call. It needs to be |
Thank you very much! Finally, they worked (attached blow) . I am then checking variables such as nodeSeg and segmentation. The variable "segmentation" is pixel-wised, over-segmented labels, and the object variable "nodeSeg" should contain their connections. But the "nodeSeg" seems to be just one dimensional python list of integers. What do those values stand for? Anyway, thank you for your kind help and guidance! plot_agglomerative_clustering.py.txt |
There 2 different segmentation images (they might be called a bit different in the different examples):
|
Thank you very much for your help! Anyway, I have succeeded in the labeling of a probability map of cellular boundaries (in a EM image) that was produced by a CNN. Now I am seriously considering using such outputs for our study. How should I cite this API? Sincerely yours, |
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
The text was updated successfully, but these errors were encountered: