Hi Everyone,
Andy Mueller just submitted a pull request outlining a scikit-learn governance document. Since I would like to involve everyone in the adoption of a similar document for scikit-image, I thought I would bring it to your attention so that you can start to stew on things you might like or dislike about it. (I have yet to stew on it but, broadly, it seems like a good fit for us too. =)
https://github.com/scikit-learn/scikit-learn/pull/12878
Juan.
Hello, this is BERTRAND NOUVEL ,
To cope with ever increasing amounts of spam mail, we have subscribed to a filter service.
This service blocks all emails with the exception of trusted correspondents.
So I have not yet received your last email,
In order to prove you are a genuine sender and not a spam-sending machine, please click on link below and follow the instructions on the page which opens.
https://www.SpamEnMoins.com/Autoriser.php?E=NV9IPCsZCAJCPRggFDEyHwwCDR0iSyw…
You will then be immediately and permanently added to my list of trusted correspondants.
Your last email will also be delivered without delay.
Thanks in advance!
BERTRAND NOUVEL
-------------------------------------------------------
Bonjour,
Vous m’avez récemment envoyé un e-mail ([scikit-image] Re: New chat fo...), et je vous en remercie.
Si vous souhaitez que je le reçoive, cliquez simplement sur le lien ci-dessous et suivez les instructions (quelques secondes suffisent) :
https://www.SpamEnMoins.com/Autoriser.php?E=NV9IPCsZCAJCPRggFDEyHwwCDR0iSyw…
Je recevrai alors votre mail (qui est actuellement bloqué par le service que j’utilise désormais pour faire face aux nombreux courriers indésirables).
Vous n’aurez ensuite plus besoin de faire cette action lors de vos prochains envois.
Merci d'avance
BERTRAND NOUVEL
Hi everyone,
I'd like to try Zulip for a while as a new chat forum for skimage.
Gitter's interface is clunky, and it makes it hard to track various
discussions, especially once they've intermingled.
The new online chat is here:
https://skimage.zulipchat.com
(You'll see that the gitter history has been imported.)
It takes a little bit of getting used to, but in essence its most useful
feature is that you can start conversations on various "topics".
Please sign in, especially during the upcoming Paris sprint, and let's
see how it goes!
Best regards,
Stéfan
Dear all,
Emmanuelle proposed to organize a sprint in december in Paris. Our
objective is gather devs who are already familiar with scikit-image and
our dev tools to progress on some PR.
At least, the group will be composed of Emmanuelle Gouillart, Thomas
Walter, and myself. If you would like to join (physically in Paris or
remotely), you are welcome. Our github might experience a higher
activity, don't be surprised :)
Let us know if you would like to join. If some of you want to
participate remotely, we will do our best to communicate on the chat.
All the best,
--
François Boulogne.
http://www.sciunto.org
GPG: 32D5F22F
Hi all,
Last week we had a core developer meeting. In attendance were Stéfan van der Walt, Alexandre Fioravante de Siqueira, Gregory Lee, and myself. This is probably the last non-public core developer meeting. Next year we will open them up to anyone, like NumPy does. Look out for announcements on this list.
In the meantime, in the interest of transparency, I'm posting a summary of the meeting based on my notes.
1. Performance with Cython, Numba, GPU/Cuda/CuPy
We discussed the performance of scikit-image, which as we know is generally sluggish compared to closer-to-the-metal, optimised libraries such as OpenCV, not to mention GPU-enabled tools. Although we value [1] clean, clear implementations over cutting edge performance, in many cases, the gap is 20-30x, not a more acceptable 20-30%, or even 2x. We do get a significant number of support requests about this, so we should pay attention to it.
Among the speedup strategies discussed were:
- Cythonising all the things
- Numba (a NumPy-focused just-in-time compiler)
- CuPy (a drop-in NumPy replacement that computes on nvidia GPUs)
Stéfan noted, and we all agreed, that we don't have the resources to maintain parallel "backends" that depend on the users' hardware, GPU drivers, and optional dependencies, so we are generally limited to tools that give us speedups "for free". As such, since we can't limit ourselves to only accepting CuPy arrays as input, CuPy is not currently an option. However, it's plausible that we could soon get CuPy support for free thanks to the NEP 18 [2] NumPy proposal, which would allow functions such as `np.sum` to be executed differently depending on the type of its arguments, so that `np.sum` on a dask array would return a dask graph node, while it would execute on the GPU if its argument was a CuPy array. Thus, scikit-image functions composed mostly of high-level NumPy calls will be accelerated automatically.
We will be monitoring developments in this space very closely to see how they can be applied to scikit-image.
Cythonising all of scikit-image (even outside of the inner loops) has a high cost for readability, debugging, and building, since our entire code base would then be opaque to most Python tools, so this is not an option we will pursue. Generally, also, where we have run profiling, scikit-image functions spend over 80% of their time in NumPy operations or already-Cythonised code, so this approach would at best give us a 20% speedup in most cases. (Other libraries have obtained 2-3x speedups [3], but that is in a very different domain.)
The other option that was mentioned is Numba. Here we could perhaps make a nearly immediate push. As some of you might know by now, I received a fellowship from the Chan-Zuckerberg Initiative to improve the scikit-image library and the surrounding ecosystem for microscopy and other bioimage analysis. (I will write more about this separately!) This is the first dedicated funding that the scikit-image project has received, and we will continue pushing to ensure that it's only the beginning. More specifically, Stéfan pointed out that the Moore Foundation is aiming to fund more open source in the scientific Python space in the near future. We are planning to submit both a dedicated scikit-image proposal, and a more specific joint proposal between scikit-image and Numba.
2. Proposal for our vision/mission/values statement.
Already linked above is my pull request to add a vision/mission/values statement for scikit-image to our documentation [1]. We'd like to get broad input before merging that (work-in-progress) PR. Stéfan pointed out that it's very easy to get into a "refine" mode when reading a document, fiddling with the grammar and phrasing of things, or even critiquing the statements that are already there. It's much harder to think of what's *missing* from the document. Is there something you think such this document should say that it doesn't? Please get involved by commenting on the pull request!
3. Discussion of existing pull requests
We discussed several pull requests currently in progress:
- in the pull request adding fused type support to denoising and warping [4], which includes work by Matthew Bowden, Mark Harfouche, and myself, Mark pointed out that we have a *comment* in our existing code that our biquadratic interpolation implementation is incorrect, but it nevertheless gets executed if requested. We agreed that this should `transform.warp` should instead raise a `NotImplementedError` if `order=2` is given.
- Alexandre's `threshold_multiotsu` pull request [5] is currently stalled due to the tension between performance and elegant code. The implementation that we all agree makes sense here uses `itertools.combinations` instead of multiply-nested for-loops. However, even if one ignores the massive advantage of Cython in for-loops, the pure Python for-loop version is much faster than the itertools version. I suspect the optimal way to do this is an array-based implementation of itertools.combinations in Cython, but it's tricky for sure. Any help with optimising that code is much appreciated!
- Greg pointed out that some parts of the library use `img_as_float` in conjunction with `np.clip`. This used to be fine until someone [6] came around and made `img_as_float` pass through float32 arrays without checking that their range. So now it was possible to send in a float32 image in an arbitrary range and then have it be clipped to [0, 1]. Greg is fixing this behaviour for denoising in #3584 [7], but a more complete audit will need to happen. A good place for discussion is probably #3373 [8].
- Finally, we discussed Mark's demosaicing pull request [9], and decided that it does indeed make sense to have a reference implementation in scikit-image, probably within the io module.
That's it for my summary. Stéfan, Greg, and Alexandre, if I missed something, please reply to this list!
See you all in 2019 for our first public meeting! =)
Juan.
.. [1]: https://github.com/scikit-image/scikit-image/pull/3585
.. [2]: https://www.numpy.org/neps/nep-0018-array-function-protocol.html
.. [3]: http://matthewrocklin.com/blog/work/2014/05/01/Fast-Data-Structures
.. [4]: https://github.com/scikit-image/scikit-image/pull/3486
.. [5]: https://github.com/scikit-image/scikit-image/pull/3385
.. [6]: https://github.com/scikit-image/scikit-image/pull/3052
.. [7]: https://github.com/scikit-image/scikit-image/pull/3584
.. [8]: https://github.com/scikit-image/scikit-image/issues/3373
.. [9]: https://github.com/scikit-image/scikit-image/pull/3057
you can also try sknw
----- 原始邮件 -----
发件人: Leena Chourey<leenagour(a)gmail.com>
收件人: Mailing list for scikit-image (http://scikit-image.org)<scikit-image(a)python.org>
主题: [scikit-image] Re: Medial axis skeletonization length
日期: 2018-11-30 09:10
hi tried installing skan, successful install, but getting error while using :
---------------------------------------------------------------
from skan import csr
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/home/etu/.eclipse/org.eclipse.platform_3.8_155965261/plugins/org.python.pydev_4.5.5.201603221110/pysrc/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/skan/__init__.py", line 1, in <module>
from .csr import skeleton_to_csgraph, branch_statistics, summarise
File "/home/etu/.eclipse/org.eclipse.platform_3.8_155965261/plugins/org.python.pydev_4.5.5.201603221110/pysrc/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/skan/csr.py", line 164
junction_centroids, *, spacing=1):
^
SyntaxError: invalid syntax
On Thu, Nov 29, 2018 at 6:20 AM Juan Nunez-Iglesias <jni(a)fastmail.com> wrote:
Hi Stefanie, Jean-Patrick, et al,
I invite you to look at my Skan (skeleton analysis) package. Docs here:
https://jni.github.io/skan/
Paper here:
https://peerj.com/articles/4312/
(the supplemental info mentions some of the edge cases we’ve taken care of.)
Skan is installable with "pip install skan" or "conda install -c conda-forge skan”.
I’m working on a new higher level Skeleton class, but it’s a WIP and you’ll need to install from source:
https://github.com/jni/skan/blob/5c0d23e5b1eab2fb06b25ff599e98eaa11d621e6/s…
(Not that that’s a big deal since the lib is pure Python.)
Comments, suggestions, and contributions are all welcome!
Juan.
On 29 Nov 2018, at 8:37 am, Jean-Patrick Pommier <jeanpatrick.pommier(a)gmail.com> wrote:
I tried this : https://dip4fish.blogspot.com/2014/05/construct-graph-from-skeleton-image-o…
Le mer. 28 nov. 2018 à 19:59, Stefanie Lück <luecks(a)gmail.com> a écrit :
Dear all,
I have a question I use the medial axis skeletonization implementation of scikit-image. Is it possible to get the length of the medial axis and the number of branches growing from the medial axis?
Thank you very much in advance
Stefanie
_______________________________________________
scikit-image mailing list -- scikit-image(a)python.org
To unsubscribe send an email to scikit-image-leave(a)python.org
--
http://dip4fish.blogspot.fr/
Dedicated to Digital Image Processing for FISH, QFISH and other things about the telomeres.
_______________________________________________
scikit-image mailing list -- scikit-image(a)python.org
To unsubscribe send an email to scikit-image-leave(a)python.org
_______________________________________________
scikit-image mailing list -- scikit-image(a)python.org
To unsubscribe send an email to scikit-image-leave(a)python.org
_______________________________________________
scikit-image mailing list -- scikit-image(a)python.org
To unsubscribe send an email to scikit-image-leave(a)python.org
来自新浪邮箱触屏版
Dear François and all,
please count me in remotely as well, in the afternoons at least.
Kind regards,
Alex
On Mon, 2018-12-03 at 12:00 -0500, scikit-image-request(a)python.org
wrote:
> Send scikit-image mailing list submissions to
> scikit-image(a)python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://mail.python.org/mm3/mailman3/lists/scikit-image.python.
> org/
> or, via email, send a message with subject or body 'help' to
> scikit-image-request(a)python.org
>
> You can reach the person managing the list at
> scikit-image-owner(a)python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of scikit-image digest..."
> Today's Topics:
>
> 1. Developer sprint, december 18th and 19th in Paris
> (François Boulogne)
> 2. Re: Developer sprint, december 18th and 19th in Paris
> (Deborah Akuoko)
> 3. Re: Developer sprint, december 18th and 19th in Paris
> (Juan Nunez-Iglesias)
> 4. Re: Developer sprint, december 18th and 19th in Paris
> (Emmanuelle Gouillart)
> 5. Re: Developer sprint, december 18th and 19th in Paris
> (Stefan van der Walt)
> _______________________________________________
> scikit-image mailing list -- scikit-image(a)python.org
> To unsubscribe send an email to scikit-image-leave(a)python.org
graph is a networkx.MultiGraph object. you can see the networkx's document.and you can do many network operate such as find shortest path...
here you should add another loop:
for (s,e) in graph.edges(): for key in graph[s][e]: ps = graph[s][e][key]['pts'] plt.plot(ps[:,1], ps[:,0], 'green')
any other question please be free to give issueps. you can use sknw from https://github.com/Image-Py/imagepy with out coding.
YXDragon----- 原始邮件 -----
发件人:Deepa <deepamahm.iisc(a)gmail.com>
收件人:imagepy(a)sina.com, scikit-image(a)python.org
主题:Re: Re: [scikit-image] 回复:Re: Converting an image to a skeleton
日期:2018年12月01日 21点55分
I checked the documentation.I could obtain the edges,[(0, 1, 0), (0, 1, 1), (0, 1, 2), (2, 4, 0), (2, 12, 0), (2, 8, 0), (3, 5, 0), (3, 4, 0), (3, 4, 1), (5, 18, 0), (5, 11, 0), (6, 11, 0), (6, 7, 0), (6, 7, 1), (7, 8, 0), (8, 10, 0), (9, 13, 0), (9, 12, 0), (9, 14, 0), (10, 11, 0), (10, 13, 0), (12, 20, 0), (13, 16, 0), (14, 24, 0), (14, 17, 0), (15, 19, 0), (15, 16, 0), (15, 16, 1), (17, 22, 0), (17, 20, 0), (18, 19, 0), (18, 29, 0), (19, 24, 0), (20, 25, 0), (21, 23, 0), (21, 23, 1), (21, 22, 0), (22, 27, 0), (23, 26, 0), (24, 26, 0), (25, 25, 0), (26, 28, 0), (27, 28, 0), (27, 28, 1)]
I could exactly understand this,graph.edge(id1, id2)[0]
For a simple graph,
for (s,e) in graph.edges(): ps = graph[s][e]['pts'] plt.plot(ps[:,1], ps[:,0], 'green')
the above works.
Could you please suggest how the above loop has to be modified to obtain the positions of multi-edges?
Thanks a lot,Deepa
On Fri, Nov 30, 2018 at 6:10 PM <imagepy(a)sina.com> wrote:
Please see sknw's document on github's read me. the default multi = Falseand if it's a multigraph, you must add a index after two node id to get the edge, like: graph.edge(id1, id2)[0]graph = sknw.build_sknw(ske, multi=False)ske: should be a nd skeleton imagemulti: if True,a multigraph is retured, which allows more than one edge between two nodes and self-self edge. default is False.return: is a networkx Graph object----- 原始邮件 -----
发件人:Deepa <deepamahm.iisc(a)gmail.com>
收件人:imagepy(a)sina.com, scikit-image(a)python.org
主题:Re: [scikit-image] 回复:Re: Converting an image to a skeleton
日期:2018年11月30日 17点36分
I checked the sknw package .I'm using the input matrix data of the skeleton image that is created using Mathematica.Here is my code that is written to highlight all the nodes and edges
from skimage.morphology import skeletonizefrom skimage import dataimport sknwimport numpy as npimport matplotlib.pyplot as pltimport scipy.io as spioimport networkx as nxfrom networkx.drawing.nx_pydot import write_dotmat = spio.loadmat('file.mat', squeeze_me=True)print(type(mat))print(type(mat.get('Expression1')))print(mat.get('Expression1'))img1 = mat.get('Expression1')print(img1)ske = skeletonize(img1).astype(np.uint16)# build graph from skeletongraph = sknw.build_sknw(ske)
# draw imageplt.imshow(img1, cmap='gray')
# draw edges by ptsfor (s,e) in graph.edges(): ps = graph[s][e]['pts'] plt.plot(ps[:,1], ps[:,0], 'green')
# draw node by onode, nodes = graph.node, graph.nodes()ps = np.array([node[i]['o'] for i in nodes])plt.plot(ps[:,1], ps[:,0], 'r.')#pos = nx.nx_agraph.graphviz_layout(graph)#print(pos)#plt.findpath(img1)# title and showplt.title('Build Graph')plt.show()
Please find the input file.mat file here. Even with sknw package I face the same problem when there are multiple edges.Please the output image attached. Some edges are not highlighted in green.
Could you please suggest how this can be improved?
On Thu, Nov 29, 2018 at 7:33 PM <imagepy(a)sina.com> wrote:
please see my mail earlier,skan and sknw on github.
----- 原始邮件 -----
发件人: Leena Chourey<leenagour(a)gmail.com>
收件人: Mailing list for scikit-image (http://scikit-image.org)<scikit-image(a)python.org>
主题: [scikit-image] Re: Converting an image to a skeleton
日期: 2018-11-29 19:40
I need solution for same. Pls share.
On Thu, 29 Nov 2018, 16:37 Deepa, <deepamahm.iisc(a)gmail.com> wrote:
I would like to generate a skeleton out of an image. The resulting output of the skeleton image has disconnected edges.
import skimage
from skimage import data,io,filters
import numpy as np
import cv2
import matplotlib.pyplot as plt
from skimage.filters import threshold_adaptive,threshold_mean
from skimage.morphology import binary_dilation
from skimage import feature
from skimage.morphology import skeletonize_3d
imgfile = "Bagah.jpeg"
im = cv2.imread(imgfile)
image = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY)
thresh = threshold_mean(image)
thresh = threshold_mean(thresh)
binary = image > thresh
#dilate = skimage.morphology.binary_dilation(binary)
gaussian = skimage.filters.gaussian(binary)
edges = filters.sobel(gaussian)
#dilate = feature.canny(edges)#binary,sigma=0)
skeleton = skeletonize_3d(gaussian)#binary)
fig, axes = plt.subplots(nrows=2,ncols=2, figsize=(8, 2))
ax = axes.ravel()
ax[0].imshow(gaussian, cmap=plt.cm.gray)
ax[0].set_title('gaussian')
ax[1].imshow(skeleton, cmap=plt.cm.gray)
ax[1].set_title('skeleton')
for a in ax:
a.axis('off')
plt.show()
Please find the attachments of my input and output files.
I would like to translate this skeleton into a graph with nodes and edges.
Could someone suggest how to obtain a skeleton with connected edges?
I’m protected online with Avast Free Antivirus. Get it here — it’s free forever.
_______________________________________________
scikit-image mailing list -- scikit-image(a)python.org
To unsubscribe send an email to scikit-image-leave(a)python.org
_______________________________________________
scikit-image mailing list -- scikit-image(a)python.org
To unsubscribe send an email to scikit-image-leave(a)python.org
来自新浪邮箱触屏版_______________________________________________
scikit-image mailing list -- scikit-image(a)python.org
To unsubscribe send an email to scikit-image-leave(a)python.org
Please see sknw's document on github's read me. the default multi = Falseand if it's a multigraph, you must add a index after two node id to get the edge, like: graph.edge(id1, id2)[0]graph = sknw.build_sknw(ske, multi=False)ske: should be a nd skeleton imagemulti: if True,a multigraph is retured, which allows more than one edge between two nodes and self-self edge. default is False.return: is a networkx Graph object----- 原始邮件 -----
发件人:Deepa <deepamahm.iisc(a)gmail.com>
收件人:imagepy(a)sina.com, scikit-image(a)python.org
主题:Re: [scikit-image] 回复:Re: Converting an image to a skeleton
日期:2018年11月30日 17点36分
I checked the sknw package .I'm using the input matrix data of the skeleton image that is created using Mathematica.Here is my code that is written to highlight all the nodes and edges
from skimage.morphology import skeletonizefrom skimage import dataimport sknwimport numpy as npimport matplotlib.pyplot as pltimport scipy.io as spioimport networkx as nxfrom networkx.drawing.nx_pydot import write_dotmat = spio.loadmat('file.mat', squeeze_me=True)print(type(mat))print(type(mat.get('Expression1')))print(mat.get('Expression1'))img1 = mat.get('Expression1')print(img1)ske = skeletonize(img1).astype(np.uint16)# build graph from skeletongraph = sknw.build_sknw(ske)
# draw imageplt.imshow(img1, cmap='gray')
# draw edges by ptsfor (s,e) in graph.edges(): ps = graph[s][e]['pts'] plt.plot(ps[:,1], ps[:,0], 'green')
# draw node by onode, nodes = graph.node, graph.nodes()ps = np.array([node[i]['o'] for i in nodes])plt.plot(ps[:,1], ps[:,0], 'r.')#pos = nx.nx_agraph.graphviz_layout(graph)#print(pos)#plt.findpath(img1)# title and showplt.title('Build Graph')plt.show()
Please find the input file.mat file here. Even with sknw package I face the same problem when there are multiple edges.Please the output image attached. Some edges are not highlighted in green.
Could you please suggest how this can be improved?
On Thu, Nov 29, 2018 at 7:33 PM <imagepy(a)sina.com> wrote:
please see my mail earlier,skan and sknw on github.
----- 原始邮件 -----
发件人: Leena Chourey<leenagour(a)gmail.com>
收件人: Mailing list for scikit-image (http://scikit-image.org)<scikit-image(a)python.org>
主题: [scikit-image] Re: Converting an image to a skeleton
日期: 2018-11-29 19:40
I need solution for same. Pls share.
On Thu, 29 Nov 2018, 16:37 Deepa, <deepamahm.iisc(a)gmail.com> wrote:
I would like to generate a skeleton out of an image. The resulting output of the skeleton image has disconnected edges.
import skimage
from skimage import data,io,filters
import numpy as np
import cv2
import matplotlib.pyplot as plt
from skimage.filters import threshold_adaptive,threshold_mean
from skimage.morphology import binary_dilation
from skimage import feature
from skimage.morphology import skeletonize_3d
imgfile = "Bagah.jpeg"
im = cv2.imread(imgfile)
image = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY)
thresh = threshold_mean(image)
thresh = threshold_mean(thresh)
binary = image > thresh
#dilate = skimage.morphology.binary_dilation(binary)
gaussian = skimage.filters.gaussian(binary)
edges = filters.sobel(gaussian)
#dilate = feature.canny(edges)#binary,sigma=0)
skeleton = skeletonize_3d(gaussian)#binary)
fig, axes = plt.subplots(nrows=2,ncols=2, figsize=(8, 2))
ax = axes.ravel()
ax[0].imshow(gaussian, cmap=plt.cm.gray)
ax[0].set_title('gaussian')
ax[1].imshow(skeleton, cmap=plt.cm.gray)
ax[1].set_title('skeleton')
for a in ax:
a.axis('off')
plt.show()
Please find the attachments of my input and output files.
I would like to translate this skeleton into a graph with nodes and edges.
Could someone suggest how to obtain a skeleton with connected edges?
I’m protected online with Avast Free Antivirus. Get it here — it’s free forever.
_______________________________________________
scikit-image mailing list -- scikit-image(a)python.org
To unsubscribe send an email to scikit-image-leave(a)python.org
_______________________________________________
scikit-image mailing list -- scikit-image(a)python.org
To unsubscribe send an email to scikit-image-leave(a)python.org
来自新浪邮箱触屏版_______________________________________________
scikit-image mailing list -- scikit-image(a)python.org
To unsubscribe send an email to scikit-image-leave(a)python.org