Image-Py / sknw

build net work from skeleton image (2D-3D)
BSD 3-Clause "New" or "Revised" License
224 stars 48 forks source link

I run the sample code, but graph.edges()=[], and the horse figure only shows 1 node 0 edge. #6

Open 1912351430 opened 4 years ago

1912351430 commented 4 years ago

I run the sample code, but graph.edges()=[], and the horse figure only shows 1 node 0 edge.

image

and i have a lot of numba warning like:

NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "mark" failed type inference due to: Untyped global name 'neighbors': cannot determine Numba type of <class 'function'>

File "C:\Users\zhuyf_6837\AppData\Local\Programs\Python\Python37\lib\site-packages\sknw\sknw.py", line 18: def mark(img): # mark the array use (0, 1, 2) nbs = neighbors(img.shape)

does this has anything to do with incompatible version? I use Python 3.7.3, and run the sample code in pycharm, all related library( skimage,sknw,numba…… ) were installed in pycharm. I am an art student, and very new to python, sorry if my question sounds idiotic……

1912351430 commented 4 years ago

OK, I later tried the source code and it works perfectly. but the sknw I got from "pip install sknw" still doesn't work…

yxdragon commented 4 years ago

oh, I did not update the pypi for a long time. I would do it later.

1912351430 commented 4 years ago

Thanks. Very useful  library! Nice job!

---Original--- From: "Yan xiaolong"<notifications@github.com> Date: Thu, May 14, 2020 13:41 PM To: "Image-Py/sknw"<sknw@noreply.github.com>; Cc: "Author"<author@noreply.github.com>;"1912351430"<1912351430@qq.com>; Subject: Re: [Image-Py/sknw] I run the sample code, but graph.edges()=[], and the horse figure only shows 1 node 0 edge. (#6)

oh, I did not update the pypi for a long time. I would do it later.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Flynamic commented 4 years ago

I have the same problem, but neither this repository nor the release from PyPi are working currently. Removing the @jit marks however seems to do the trick, so this is probably an issue with numba.

yxdragon commented 4 years ago

@Flynamic updated on pypi, have a try!

Flynamic commented 4 years ago

Thank you, works like a charm!