From vighneshbirodkar at gmail.com Thu Sep 3 11:26:53 2015 From: vighneshbirodkar at gmail.com (Vighnesh Birodkar) Date: Thu, 3 Sep 2015 08:26:53 -0700 (PDT) Subject: future.graph.merge_hierarchical In-Reply-To: <55E4675C.3030300@gmail.com> References: <55E4675C.3030300@gmail.com> Message-ID: <933de804-9f5a-44c6-80d3-8f6f6f8aee80@googlegroups.com> Hello At each step, the edge with the least weight is merged. The code uses a min heap for that. You could take an inverse of your measure such that similar nodes have lesser values. 'in_place' just decides whether a new node is created for a merge or not, it most likely won't do what you need in this case. I hope I was clear. Thanks Vighnesh On Tuesday, September 1, 2015 at 7:24:31 PM UTC-4, bricklemacho wrote: > > Hi All, > > I am looking at generating some detection proposals, see Hosang, Jan, et > al. "What makes for effective detection proposals?." *arXiv preprint > arXiv:1502.05082* (2015), http://arxiv.org/pdf/1502.05082.pdf Starting > with the Selective Search algorithm, Section 3 of Uijlings, Jasper RR, et > al. "Selective search for object recognition." *International journal of > computer vision* 104.2 (2013): 154-171, > https://staff.fnwi.uva.nl/th.gevers/pub/GeversIJCV2013.pdf > > The basic idea is the performing a hierarchical merging of the image, > where each new merge get added to the list of regions suspected to contain > an object, you can capture objects at all scales. This reduces the search > space significantly than say compared to floating window. The output is > NOT a image segmentaiton, rather a list of regions (bounding boxes) of > potential objects (deteciton proposals). > > I have looked in the gallery at RAG Merging > http://scikit-image.org/docs/dev/auto_examples/plot_rag_merge.html, > fairly confident I can setup the callback methods to provided the > similarity measure. I am naively hoping that future.graph.hierarchical(), > even though it seems to output a segmentation (labels), can be easily > adapted to the task. What would be the best way to have > future.graph.merge_hierarchica() merge regions with the "highest" > similarity measure, rather thana threshold? What would be the best way > future.graph.merge_hierarchica() save each merged region? Tried setting > "in_place" to false, but didn't notice any difference. > > Any help appreciated, > > Brickle. > -- > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bricklemacho at gmail.com Sun Sep 6 08:20:48 2015 From: bricklemacho at gmail.com (bricklemacho at gmail.com) Date: Sun, 6 Sep 2015 20:20:48 +0800 Subject: future.graph.merge_hierarchical In-Reply-To: <933de804-9f5a-44c6-80d3-8f6f6f8aee80@googlegroups.com> References: <55E4675C.3030300@gmail.com> <933de804-9f5a-44c6-80d3-8f6f6f8aee80@googlegroups.com> Message-ID: <55EC2FA0.8040305@gmail.com> Hi, Been away for a few days. Thanks for that, clears a few things up. I am looking at modifying the RAG code from the furture.graph. Regards, Brickle. On 3/09/2015 11:26 pm, Vighnesh Birodkar wrote: > Hello > > At each step, the edge with the least weight is merged. The code uses > a min heap for that. You could take an inverse of your measure such > that similar nodes have lesser values. 'in_place' just decides whether > a new node is created for a merge or not, it most likely won't do what > you need in this case. > > I hope I was clear. > > Thanks > Vighnesh > > On Tuesday, September 1, 2015 at 7:24:31 PM UTC-4, bricklemacho wrote: > > Hi All, > > I am looking at generating some detection proposals, see Hosang, > Jan, et al. "What makes for effective detection proposals?." > /arXiv preprint arXiv:1502.05082/ (2015), > http://arxiv.org/pdf/1502.05082.pdf > Starting with the Selective > Search algorithm, Section 3 of Uijlings, Jasper RR, et al. > "Selective search for object recognition." /International journal > of computer vision/ 104.2 (2013): 154-171, > https://staff.fnwi.uva.nl/th.gevers/pub/GeversIJCV2013.pdf > > > The basic idea is the performing a hierarchical merging of the > image, where each new merge get added to the list of regions > suspected to contain an object, you can capture objects at all > scales. This reduces the search space significantly than say > compared to floating window. The output is NOT a image > segmentaiton, rather a list of regions (bounding boxes) of > potential objects (deteciton proposals). > > I have looked in the gallery at RAG Merging > http://scikit-image.org/docs/dev/auto_examples/plot_rag_merge.html > , > fairly confident I can setup the callback methods to provided the > similarity measure. I am naively hoping that > future.graph.hierarchical(), even though it seems to output a > segmentation (labels), can be easily adapted to the task. What > would be the best way to have future.graph.merge_hierarchica() > merge regions with the "highest" similarity measure, rather thana > threshold? What would be the best way > future.graph.merge_hierarchica() save each merged region? Tried > setting "in_place" to false, but didn't notice any difference. > > Any help appreciated, > > Brickle. > -- > > > > > -- > You received this message because you are subscribed to the Google > Groups "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to scikit-image+unsubscribe at googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Mon Sep 7 18:00:23 2015 From: stefanv at berkeley.edu (Stefan van der Walt) Date: Mon, 07 Sep 2015 15:00:23 -0700 Subject: StackOverflow background segmentation challenge Message-ID: <87vbblgaa0.fsf@berkeley.edu> Hi all, I saw this on StackOverflow today: http://stackoverflow.com/questions/29313667/how-do-i-remove-the-background-from-this-kind-of-image Perhaps the new Active Contours PR would be ideal, or do you have any other ideas for background segmentation? I'd love to hear them! St?fan From emmanuelle.gouillart at nsup.org Tue Sep 8 02:40:04 2015 From: emmanuelle.gouillart at nsup.org (Emmanuelle Gouillart) Date: Tue, 8 Sep 2015 08:40:04 +0200 Subject: StackOverflow background segmentation challenge In-Reply-To: <87vbblgaa0.fsf@berkeley.edu> References: <87vbblgaa0.fsf@berkeley.edu> Message-ID: <20150908064004.GA1779618@phare.normalesup.org> Yes, I think it would be a great idea! Initializing the contour on the (rectangular) boundary of the image should do the job, I think. I'll try it out tonight, hopefully. I also think it would be nice to be a bit more present on Stackoverflow/image processing, because it's a bit sad most questions are related to Matlab... time to change this :-)! Cheers, Emma On Mon, Sep 07, 2015 at 03:00:23PM -0700, Stefan van der Walt wrote: > Hi all, > I saw this on StackOverflow today: > http://stackoverflow.com/questions/29313667/how-do-i-remove-the-background-from-this-kind-of-image > Perhaps the new Active Contours PR would be ideal, or do you have any other > ideas for background segmentation? I'd love to hear them! > St??fan From h.benoudjit at gmail.com Wed Sep 9 08:15:03 2015 From: h.benoudjit at gmail.com (h.benoudjit at gmail.com) Date: Wed, 9 Sep 2015 05:15:03 -0700 (PDT) Subject: Thresholding of a color image (Three-channels RGB) Message-ID: <5c64910a-5673-4e37-b894-49b6031ee48e@googlegroups.com> Hi, I have a very basic question about *thresholding* in *Scikit-image* (or maybe it's actually a *numpy *question). I'm performing a simple *otsu thresholding *on an image, that I've read previously: img = io.imread('flood.jpg') print img.shape # otsu thresholding of the image cell2 = fig.add_subplot(1, 2, 2) threshold = threshold_otsu(img) thresholded_img = img > threshold Everything is working, however I've a question concerning the thresholding on a multi-dimensional of the image read. I noticed that image has been loaded as *three-channels RGB*; How is the *thresholded RGB image *drawn on the screen? Knowing that the *thresholded_img *object is a *boolean numpy array *still having *three dimensions *(the three color axes). I mean, if it had only one channel, it would be easy *True=255 *and *False=0; *but in the case of a *3-channels image*, is a *logical-AND *performed on the *RGB-image *to flatten it to a *single-channel image*? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.benoudjit at gmail.com Wed Sep 9 09:22:30 2015 From: h.benoudjit at gmail.com (h.benoudjit at gmail.com) Date: Wed, 9 Sep 2015 06:22:30 -0700 (PDT) Subject: Thresholding of a color image (Three-channels RGB) In-Reply-To: <20150909124113.GA2741816@phare.normalesup.org> References: <5c64910a-5673-4e37-b894-49b6031ee48e@googlegroups.com> <20150909124113.GA2741816@phare.normalesup.org> Message-ID: Hi, Thanks for your reponse. You're right, the image needs to be converted to *gray scale *(single channel) before being given as input to *threshold_otsu*. Indeed, in the present case, the *threshold *is computed for the flatten *1D array *of all *three channels*, inside the *otsu_threshold *function. However, I'm getting better results with the previous code than with the thresholding of the *gray scale *image for this image: http://www.e-geos.it/gallery/featured/flooding_veneto/CSKS1_SCS_B_HI_08_HH_RD_SF_20101103172214_20101103172222_orto_hh_slc_geo_subset.jpg. Maybe, it's because the *threshold *is computed from the accumulated intensities of all the channels. Maybe I could obtain similar results if I perform the *otsu thresholding *on all three channels and try to stack them (OR operator). Le mercredi 9 septembre 2015 13:41:14 UTC+1, Emmanuelle Gouillart a ?crit : > > Hi, > > thanks for your question. > > The first line of the threshold_otsu function is > hist, bin_centers = histogram(image.ravel(), nbins) > meaning that all channels are combined together with ravel (in other > words, the algorithm behaves as if the color image were a 3-D image). > > I think that this is a bug and that the function should behave in a > different way. > > An option for you is to convert the image to grayscale before using > threshold_otsu > > Cheers, > Emmanuelle > > On Wed, Sep 09, 2015 at 05:15:03AM -0700, h.ben... at gmail.com > wrote: > > Hi, > > > I have a very basic question about thresholding in Scikit-image (or > maybe it's > > actually a numpy question). > > I'm performing a simple otsu thresholding on an image, that I've read > > previously: > > > > img = io.imread('flood.jpg') > > print img.shape > > > # otsu thresholding of the image > > cell2 = fig.add_subplot(1, 2, 2) > > threshold = threshold_otsu(img) > > thresholded_img = img > threshold > > > Everything is working, however I've a question concerning the > thresholding on a > > multi-dimensional of the image read. > > I noticed that image has been loaded as three-channels RGB; How is the > > thresholded RGB image drawn on the screen? > > > Knowing that the thresholded_img object is a boolean numpy array still > having > > three dimensions (the three color axes). I mean, if it had only one > channel, it > > would be easy True=255 and False=0; but in the case of a 3-channels > image, is a > > logical-AND performed on the RGB-image to flatten it to a single-channel > image? > > > Thanks. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.benoudjit at gmail.com Wed Sep 9 12:35:29 2015 From: h.benoudjit at gmail.com (h.benoudjit at gmail.com) Date: Wed, 9 Sep 2015 09:35:29 -0700 (PDT) Subject: Thresholding of a color image (Three-channels RGB) In-Reply-To: <20150909135349.GE2741816@phare.normalesup.org> References: <5c64910a-5673-4e37-b894-49b6031ee48e@googlegroups.com> <20150909124113.GA2741816@phare.normalesup.org> <20150909135349.GE2741816@phare.normalesup.org> Message-ID: <911af620-a08b-4109-9358-811f9963014e@googlegroups.com> Correct, the weird effect I was getting in the display was because I was using *Matplotlib *to display only *1-channel *for both the *original image *and the *thresholded image*. Because of the *1-channel image *having just *2-dimensions *(array[x, y]) it was affecting synthetic colors to it, and maybe that's why the result was different than with the *RGB *one. I need to check if *Scikit-image *allows to show both images at the same time. I'm working on *Flood mapping using Satellite radar images*, so I will be using images 10x larger than this one Le mercredi 9 septembre 2015 14:53:51 UTC+1, Emmanuelle Gouillart a ?crit : > > The image you link to is almost grayscale already, meaning that the three > channels have comparable values. With an image where one of the channels > is dominant (like the coffee image of our data module), I think the > results would be very different. > > Nice image by the way! Out of curiosity, what is your application? > > Emma > > On Wed, Sep 09, 2015 at 06:22:30AM -0700, h.ben... at gmail.com > wrote: > > Hi, > > > Thanks for your reponse. > > You're right, the image needs to be converted to gray scale (single > channel) > > before being given as input to threshold_otsu. > > Indeed, in the present case, the threshold is computed for the flatten > 1D array > > of all three channels, inside the otsu_threshold function. > > > However, I'm getting better results with the previous code than with the > > thresholding of the gray scale image for this image: > http://www.e-geos.it/ > > gallery/featured/flooding_veneto/ > > > CSKS1_SCS_B_HI_08_HH_RD_SF_20101103172214_20101103172222_orto_hh_slc_geo_subset.jpg. > > > Maybe, it's because the threshold is computed from the accumulated > intensities > > of all the channels. > > > Maybe I could obtain similar results if I perform the otsu thresholding > on all > > three channels and try to stack them (OR operator). > > > Le mercredi 9 septembre 2015 13:41:14 UTC+1, Emmanuelle Gouillart a > ?crit : > > > Hi, > > > thanks for your question. > > > The first line of the threshold_otsu function is > > hist, bin_centers = histogram(image.ravel(), nbins) > > meaning that all channels are combined together with ravel (in other > > words, the algorithm behaves as if the color image were a 3-D > image). > > > I think that this is a bug and that the function should behave in a > > different way. > > > An option for you is to convert the image to grayscale before using > > threshold_otsu > > > Cheers, > > Emmanuelle > > > On Wed, Sep 09, 2015 at 05:15:03AM -0700, h.ben... at gmail.com wrote: > > > Hi, > > > > I have a very basic question about thresholding in Scikit-image > (or maybe > > it's > > > actually a numpy question). > > > I'm performing a simple otsu thresholding on an image, that I've > read > > > previously: > > > > > img = io.imread('flood.jpg') > > > print img.shape > > > > # otsu thresholding of the image > > > cell2 = fig.add_subplot(1, 2, 2) > > > threshold = threshold_otsu(img) > > > thresholded_img = img > threshold > > > > Everything is working, however I've a question concerning the > > thresholding on a > > > multi-dimensional of the image read. > > > I noticed that image has been loaded as three-channels RGB; How is > the > > > thresholded RGB image drawn on the screen? > > > > Knowing that the thresholded_img object is a boolean numpy array > still > > having > > > three dimensions (the three color axes). I mean, if it had only > one > > channel, it > > > would be easy True=255 and False=0; but in the case of a > 3-channels > > image, is a > > > logical-AND performed on the RGB-image to flatten it to a > single-channel > > image? > > > > Thanks. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emmanuelle.gouillart at nsup.org Wed Sep 9 08:41:13 2015 From: emmanuelle.gouillart at nsup.org (Emmanuelle Gouillart) Date: Wed, 9 Sep 2015 14:41:13 +0200 Subject: Thresholding of a color image (Three-channels RGB) In-Reply-To: <5c64910a-5673-4e37-b894-49b6031ee48e@googlegroups.com> References: <5c64910a-5673-4e37-b894-49b6031ee48e@googlegroups.com> Message-ID: <20150909124113.GA2741816@phare.normalesup.org> Hi, thanks for your question. The first line of the threshold_otsu function is hist, bin_centers = histogram(image.ravel(), nbins) meaning that all channels are combined together with ravel (in other words, the algorithm behaves as if the color image were a 3-D image). I think that this is a bug and that the function should behave in a different way. An option for you is to convert the image to grayscale before using threshold_otsu Cheers, Emmanuelle On Wed, Sep 09, 2015 at 05:15:03AM -0700, h.benoudjit at gmail.com wrote: > Hi, > I have a very basic question about thresholding in Scikit-image (or maybe it's > actually a numpy question). > I'm performing a simple otsu thresholding on an image, that I've read > previously: > img = io.imread('flood.jpg') > print img.shape > # otsu thresholding of the image > cell2 = fig.add_subplot(1, 2, 2) > threshold = threshold_otsu(img) > thresholded_img = img > threshold > Everything is working, however I've a question concerning the thresholding on a > multi-dimensional of the image read. > I noticed that image has been loaded as three-channels RGB; How is the > thresholded RGB image drawn on the screen? > Knowing that the thresholded_img object is a boolean numpy array still having > three dimensions (the three color axes). I mean, if it had only one channel, it > would be easy True=255 and False=0; but in the case of a 3-channels image, is a > logical-AND performed on the RGB-image to flatten it to a single-channel image? > Thanks. From emmanuelle.gouillart at nsup.org Wed Sep 9 09:53:49 2015 From: emmanuelle.gouillart at nsup.org (Emmanuelle Gouillart) Date: Wed, 9 Sep 2015 15:53:49 +0200 Subject: Thresholding of a color image (Three-channels RGB) In-Reply-To: References: <5c64910a-5673-4e37-b894-49b6031ee48e@googlegroups.com> <20150909124113.GA2741816@phare.normalesup.org> Message-ID: <20150909135349.GE2741816@phare.normalesup.org> The image you link to is almost grayscale already, meaning that the three channels have comparable values. With an image where one of the channels is dominant (like the coffee image of our data module), I think the results would be very different. Nice image by the way! Out of curiosity, what is your application? Emma On Wed, Sep 09, 2015 at 06:22:30AM -0700, h.benoudjit at gmail.com wrote: > Hi, > Thanks for your reponse. > You're right, the image needs to be converted to gray scale (single channel) > before being given as input to threshold_otsu. > Indeed, in the present case, the threshold is computed for the flatten 1D array > of all three channels, inside the otsu_threshold function. > However, I'm getting better results with the previous code than with the > thresholding of the gray scale image for this image: http://www.e-geos.it/ > gallery/featured/flooding_veneto/ > CSKS1_SCS_B_HI_08_HH_RD_SF_20101103172214_20101103172222_orto_hh_slc_geo_subset.jpg. > Maybe, it's because the threshold is computed from the accumulated intensities > of all the channels. > ??Maybe I could obtain similar results if I perform the otsu thresholding on all > three channels and try to stack them (OR operator). > Le mercredi 9 septembre 2015 13:41:14 UTC+1, Emmanuelle Gouillart a ??crit??: > Hi, > thanks for your question. > The first line of the threshold_otsu function is > hist, bin_centers = histogram(image.ravel(), nbins) > meaning that all channels are combined together with ravel (in other > words, the algorithm behaves as if the color image were a 3-D image). > I think that this is a bug and that the function should behave in a > different way. > An option for you is to convert the image to grayscale before using > threshold_otsu > Cheers, > Emmanuelle > On Wed, Sep 09, 2015 at 05:15:03AM -0700, h.ben... at gmail.com wrote: > > Hi, > > I have a very basic question about thresholding in Scikit-image (or maybe > it's > > actually a numpy question). > > I'm performing a simple otsu thresholding on an image, that I've read > > previously: > > img = io.imread('flood.jpg') > > print img.shape > > # otsu thresholding of the image > > cell2 = fig.add_subplot(1, 2, 2) > > threshold = threshold_otsu(img) > > thresholded_img = img > threshold > > Everything is working, however I've a question concerning the > thresholding on a > > multi-dimensional of the image read. > > I noticed that image has been loaded as three-channels RGB; How is the > > thresholded RGB image drawn on the screen? > > Knowing that the thresholded_img object is a boolean numpy array still > having > > three dimensions (the three color axes). I mean, if it had only one > channel, it > > would be easy True=255 and False=0; but in the case of a 3-channels > image, is a > > logical-AND performed on the RGB-image to flatten it to a single-channel > image? > > Thanks. From gongyuanhao at gmail.com Sat Sep 12 02:20:12 2015 From: gongyuanhao at gmail.com (yuanhao gong) Date: Fri, 11 Sep 2015 23:20:12 -0700 (PDT) Subject: curvature filter Message-ID: <31f76198-cd75-4386-b928-afa6a22a7160@googlegroups.com> Dear All, I developed several curvature filters for minimizing variational models in image processing. The source code can be found at https://github.com/YuanhaoGong/CurvatureFilter It would be cool if someone could turn this into scikit. Many users will appreciate these filters! Cheers! -------------- next part -------------- An HTML attachment was scrubbed... URL: From emmanuelle.gouillart at nsup.org Sat Sep 12 03:42:04 2015 From: emmanuelle.gouillart at nsup.org (Emmanuelle Gouillart) Date: Sat, 12 Sep 2015 09:42:04 +0200 Subject: curvature filter In-Reply-To: <31f76198-cd75-4386-b928-afa6a22a7160@googlegroups.com> References: <31f76198-cd75-4386-b928-afa6a22a7160@googlegroups.com> Message-ID: <20150912074204.GB824021@phare.normalesup.org> Hello Yuanhao, thank you very much for telling us about your curvature filters. The speed of execution is quite impressive. I didn't understand how one should choose the number of iterations, though: could you please explain the influence of the number of iterations on the final result? For scikit-image, two important questions are 1) is this feature of interest for a large number of users? (I would say yes, but I don't know about the subject...) 2) is the code easy to maintain, free of bugs, well documented? As for the second point, it is always a bit tricky for us to include very recent code (like the one that you developed during your PhD), because of the lack of hindsight regarding the algorithm and the implementation. It's almost a joke among developers (please don't be offended, it's really just a joke!) to say that for scikit-image, we strive to include only mature algorithms (typically, algorithms presented in papers that are well cited), and not code developed during a recent PhD! The reason is that if we include code on which we don't have enough hindsight (for example, if the filters do really crazy things on some kinds of images, or crash on some images, or are hard to tune), users won't like it, and it won't be good for the reputation of scikit-image. That said, your implementation is not very long, and the principle of the algorithm seems to be quite easy to understand. Do you plan to publish about these filters (maybe you already did)? Are there other papers on similar algorithms that are well cited? I know that paper citation is not a satisfying metric to quantify the maturity of an algorithm, but it's the only one I can easily get at the moment. One thing that would be possible would be to create a separate project to write your filters in Python, try to get a few people using it, get feedback on bugs and enhancements (no matter how much love and care you put into a code, there always a lot of things that need to be fixed when other people use your code!). I would definitely try to use it on my images if it were written in Python. And then we could think of including the filters in scikit-image. This are my thoughts, but other developers of scikit-image might think differently, so you might get different opinions. Anyway, thanks a lot once again, hope to hear more from you. Emmanuelle On Fri, Sep 11, 2015 at 11:20:12PM -0700, yuanhao gong wrote: > Dear All, > I developed several curvature filters for minimizing variational models in > image processing. The source code can be found at??https://github.com/ > YuanhaoGong/CurvatureFilter > It would be cool if someone could turn this into scikit. Many users will > appreciate these filters! Cheers!?? From gongyuanhao at gmail.com Sun Sep 13 00:10:38 2015 From: gongyuanhao at gmail.com (yuanhao gong) Date: Sun, 13 Sep 2015 12:10:38 +0800 Subject: curvature filter In-Reply-To: <20150912074204.GB824021@phare.normalesup.org> References: <31f76198-cd75-4386-b928-afa6a22a7160@googlegroups.com> <20150912074204.GB824021@phare.normalesup.org> Message-ID: Hi Emmanuelle, Thanks a lot for the reply! I really appreciate the feedback! The curvature filter is not only computationally fast, but also fast in the terms of minimizing the curvature energy (that is why we call it curvature filter). It is about 100 to 1000 times faster than traditional diffusion schemes when they reach the same energy level. The iteration number corresponds to the distance to the desired surface. The larger iteration number, the closer to the desired surfaces. Since the energy is exponentially reducing, the iteration number should be between 10 and 50, depending on the specific problems. After 50 iterations, it improves the result slightly. I totally understand that developers want to implement mature algorithms, which are well-known, so everyone know how to use it and know what is running behind. For curvature filter, we have submitted a paper since we believe this will be a significant work in the field. (I am saying so not because I developed curvature filter, but because of the work itself.) However, it will take about almost one year to get the official publication. By then, I hope curvature filter would already have been well-known:)p. My PhD thesis has already been downloaded more than 800 times since June 2015 (when it is put at ETH online library ), not including the count of local file exchange between researchers. I think this is a good news for the image processing community. Speaking of the bugs: even thought I put the C++ code online recently, I started developing the code one year ago. The Java version was implemented by two professional developers from Max Planck Institute. And the C++ and Java code were tested on 500 images from natural scene. We have fixed several bugs (there might still be some) before we put it online. There is no feedback on bugs so far. Please keep me informed if it crashed on your machine! I agree that it might be too early to include curvature filter into scikit. But it is really a good idea to start a project, writing curvature filter in Python! I just started learning Python several weeks ago. I hope that I could get help from scikit developers, who are experts in both of Python and image processing. I noticed that Python is quite similar with Matlab. Is there anyone interested in turning my Matlab code into Python based on the scikit API? http://www.mathworks.com/matlabcentral/fileexchange/52452-curvature-filter, It would be supper cool! Please keep me informed if you plan to do so. Best, Yuanhao Gong -------------------------------------------------------------------------------- Research Fellow at National University of Singapore PhD, ETH Zurich, Switzerland M.S., Xiamen University, China B.S., Tsinghua University, China -------------------------------------------------------------------------------- On Sat, Sep 12, 2015 at 3:42 PM, Emmanuelle Gouillart < emmanuelle.gouillart at nsup.org> wrote: > Hello Yuanhao, > > thank you very much for telling us about your curvature filters. The > speed of execution is quite impressive. I didn't understand how one > should choose the number of iterations, though: could you please explain > the influence of the number of iterations on the final result? > > For scikit-image, two important questions are 1) is this feature of > interest for a large number of users? (I would say yes, but I don't know > about the subject...) 2) is the code easy to maintain, free of bugs, well > documented? > > As for the second point, it is always a bit tricky for us to include very > recent code (like the one that you developed during your PhD), because of > the lack of hindsight regarding the algorithm and the implementation. > It's almost a joke among developers (please don't be offended, it's > really just a joke!) to say that for scikit-image, we strive to include > only mature algorithms (typically, algorithms presented in papers that > are well cited), and not code developed during a recent PhD! The reason > is that if we include code on which we don't have enough hindsight (for > example, if the filters do really crazy things on some kinds of images, > or crash on some images, or are hard to tune), users won't like it, and > it won't be good for the reputation of scikit-image. > > That said, your implementation is not very long, and the principle of the > algorithm seems to be quite easy to understand. Do you plan to publish > about these filters (maybe you already did)? Are there other papers on > similar algorithms that are well cited? I know that paper citation is not > a satisfying metric to quantify the maturity of an algorithm, but it's > the only one I can easily get at the moment. > > One thing that would be possible would be to create a separate project to > write your filters in Python, try to get a few people using it, get > feedback on bugs and enhancements (no matter how much love and care you > put into a code, there always a lot of things that need to be fixed > when other people use your code!). I would definitely try to use it on my > images if it were written in Python. And then we could think of including > the filters in scikit-image. This are my thoughts, but other developers > of scikit-image might think differently, so you might get different > opinions. > > Anyway, thanks a lot once again, hope to hear more from you. > Emmanuelle > > On Fri, Sep 11, 2015 at 11:20:12PM -0700, yuanhao gong wrote: > > Dear All, > > > I developed several curvature filters for minimizing variational models > in > > image processing. The source code can be found at https://github.com/ > > YuanhaoGong/CurvatureFilter > > > It would be cool if someone could turn this into scikit. Many users will > > appreciate these filters! Cheers! > > -- > You received this message because you are subscribed to a topic in the > Google Groups "scikit-image" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/scikit-image/-2DKudQ3mJs/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > scikit-image+unsubscribe at googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Wed Sep 16 04:39:20 2015 From: stefanv at berkeley.edu (Stefan van der Walt) Date: Wed, 16 Sep 2015 01:39:20 -0700 Subject: curvature filter In-Reply-To: References: <31f76198-cd75-4386-b928-afa6a22a7160@googlegroups.com> <20150912074204.GB824021@phare.normalesup.org> Message-ID: <87bnd2hi6f.fsf@berkeley.edu> Hi Yuanhao On 2015-09-12 21:10:38, yuanhao gong wrote: > I agree that it might be too early to include curvature filter > into scikit. But it is really a good idea to start a project, > writing curvature filter in Python! I just started learning > Python several weeks ago. I hope that I could get help from > scikit developers, who are experts in both of Python and image > processing. Nowadays, it is very easy to make your own package. In fact, you can even fork scikit-image, remove most of our library, and add your own in its place. That way, you don't have to worry too much about infrastructure! I look forward to seeing the results of your work. If it proves to be popular, we'd be happy to pull it into scikit-image. Best regards St?fan From stefanv at berkeley.edu Wed Sep 16 04:54:33 2015 From: stefanv at berkeley.edu (Stefan van der Walt) Date: Wed, 16 Sep 2015 01:54:33 -0700 Subject: Stagnant Debian bug blocking release Message-ID: <87a8smhhh2.fsf@berkeley.edu> Hi folks, We are still stuck on this issue: https://github.com/scikit-image/scikit-image/issues/1463 If you have Docker running on your system, you can help us debug the problem and be the hero of scikit-image and the entire Debian-based world. St?fan From jni.soma at gmail.com Wed Sep 16 05:34:03 2015 From: jni.soma at gmail.com (Juan Nunez-Iglesias) Date: Wed, 16 Sep 2015 02:34:03 -0700 (PDT) Subject: future.graph.merge_hierarchical In-Reply-To: <55EC2FA0.8040305@gmail.com> References: <55EC2FA0.8040305@gmail.com> Message-ID: <1442396042883.ec84464c@Nodemailer> Hey Brickle, This is a very cool application! Feel free to ask for more guidance about this. The RAG is in future because we weren't sure whether the API would provide enough for all use cases, so if it needs extending, this is exactly the kind of feedback we're looking for! If you've made any interesting changes to the code, but want help, you can submit them as a pull request on GitHub. Just start the PR title with "[WIP]" for "work in progress". Thanks! Juan. On Wed, Sep 9, 2015 at 11:23 PM, bricklemacho at gmail.com wrote: > Hi, > Been away for a few days. Thanks for that, clears a few things up. I am > looking at modifying the RAG code from the furture.graph. > Regards, > Brickle. > On 3/09/2015 11:26 pm, Vighnesh Birodkar wrote: >> Hello >> >> At each step, the edge with the least weight is merged. The code uses >> a min heap for that. You could take an inverse of your measure such >> that similar nodes have lesser values. 'in_place' just decides whether >> a new node is created for a merge or not, it most likely won't do what >> you need in this case. >> >> I hope I was clear. >> >> Thanks >> Vighnesh >> >> On Tuesday, September 1, 2015 at 7:24:31 PM UTC-4, bricklemacho wrote: >> >> Hi All, >> >> I am looking at generating some detection proposals, see Hosang, >> Jan, et al. "What makes for effective detection proposals?." >> /arXiv preprint arXiv:1502.05082/ (2015), >> http://arxiv.org/pdf/1502.05082.pdf >> Starting with the Selective >> Search algorithm, Section 3 of Uijlings, Jasper RR, et al. >> "Selective search for object recognition." /International journal >> of computer vision/ 104.2 (2013): 154-171, >> https://staff.fnwi.uva.nl/th.gevers/pub/GeversIJCV2013.pdf >> >> >> The basic idea is the performing a hierarchical merging of the >> image, where each new merge get added to the list of regions >> suspected to contain an object, you can capture objects at all >> scales. This reduces the search space significantly than say >> compared to floating window. The output is NOT a image >> segmentaiton, rather a list of regions (bounding boxes) of >> potential objects (deteciton proposals). >> >> I have looked in the gallery at RAG Merging >> http://scikit-image.org/docs/dev/auto_examples/plot_rag_merge.html >> , >> fairly confident I can setup the callback methods to provided the >> similarity measure. I am naively hoping that >> future.graph.hierarchical(), even though it seems to output a >> segmentation (labels), can be easily adapted to the task. What >> would be the best way to have future.graph.merge_hierarchica() >> merge regions with the "highest" similarity measure, rather thana >> threshold? What would be the best way >> future.graph.merge_hierarchica() save each merged region? Tried >> setting "in_place" to false, but didn't notice any difference. >> >> Any help appreciated, >> >> Brickle. >> -- >> >> >> >> >> -- >> You received this message because you are subscribed to the Google >> Groups "scikit-image" group. >> To unsubscribe from this group and stop receiving emails from it, send >> an email to scikit-image+unsubscribe at googlegroups.com >> . >> For more options, visit https://groups.google.com/d/optout. > -- > You received this message because you are subscribed to the Google Groups "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe at googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vighneshbirodkar at gmail.com Thu Sep 17 11:23:54 2015 From: vighneshbirodkar at gmail.com (Vighnesh Birodkar) Date: Thu, 17 Sep 2015 08:23:54 -0700 (PDT) Subject: future.graph.merge_hierarchical In-Reply-To: <55FAD835.5010300@gmail.com> References: <55EC2FA0.8040305@gmail.com> <1442396042883.ec84464c@Nodemailer> <55FAD835.5010300@gmail.com> Message-ID: <159a3c46-282a-4504-991f-85ac2b0db525@googlegroups.com> Hello Rather than creating an alternative method, you could always set the threshold to infinity. Won't that work in your case ? Thanks Vighnesh From bricklemacho at gmail.com Thu Sep 17 11:11:49 2015 From: bricklemacho at gmail.com (bricklemacho at gmail.com) Date: Thu, 17 Sep 2015 23:11:49 +0800 Subject: future.graph.merge_hierarchical In-Reply-To: <1442396042883.ec84464c@Nodemailer> References: <55EC2FA0.8040305@gmail.com> <1442396042883.ec84464c@Nodemailer> Message-ID: <55FAD835.5010300@gmail.com> Hi Juan, I am working on this in slow time. At the moment I am writing a generic function to create the RAG. It is similar to rag_mean_colour() but takes two callbacks, one to describe the nodes and another to compute the edge weight. Based on Vighnesh advice below, I my use case I will ensure the "least" weight implies the most similar. Theh first step will be to have the rag_generic() duplicate rag_mean_colour(). Once I am happy with rag_generic(), I will need to an create alternative merging process. The alternative method wont use a threshold but rather at each step will select the "most" similar nodes for merging. This merge process will terminate once there is a single node in the graph. The final output will be the initial regions, plus each of the single merge (hope that make sense). Anyway, I have created a fork and when basic functionally is working will submit a PR. Regards, Michael. -- On 16/09/2015 5:34 pm, Juan Nunez-Iglesias wrote: > Hey Brickle, > > This is a very cool application! Feel free to ask for more guidance > about this. The RAG is in future because we weren't sure whether the > API would provide enough for all use cases, so if it needs extending, > this is exactly the kind of feedback we're looking for! > > If you've made any interesting changes to the code, but want help, you > can submit them as a pull request on GitHub. Just start the PR title > with "[WIP]" for "work in progress". > > Thanks! > > Juan. > > > > > On Wed, Sep 9, 2015 at 11:23 PM, bricklemacho at gmail.com > > wrote: > > Hi, > > Been away for a few days. Thanks for that, clears a few things > up. I am looking at modifying the RAG code from the furture.graph. > > Regards, > > Brickle. > > > On 3/09/2015 11:26 pm, Vighnesh Birodkar wrote: >> Hello >> >> At each step, the edge with the least weight is merged. The code >> uses a min heap for that. You could take an inverse of your >> measure such that similar nodes have lesser values. 'in_place' >> just decides whether a new node is created for a merge or not, it >> most likely won't do what you need in this case. >> >> I hope I was clear. >> >> Thanks >> Vighnesh >> >> On Tuesday, September 1, 2015 at 7:24:31 PM UTC-4, bricklemacho >> wrote: >> >> Hi All, >> >> I am looking at generating some detection proposals, see >> Hosang, Jan, et al. "What makes for effective detection >> proposals?." /arXiv preprint arXiv:1502.05082/ (2015), >> http://arxiv.org/pdf/1502.05082.pdf Starting with the >> Selective Search algorithm, Section 3 of Uijlings, Jasper >> RR, et al. "Selective search for object recognition." >> /International journal of computer vision/ 104.2 (2013): >> 154-171, >> https://staff.fnwi.uva.nl/th.gevers/pub/GeversIJCV2013.pdf >> >> The basic idea is the performing a hierarchical merging of >> the image, where each new merge get added to the list of >> regions suspected to contain an object, you can capture >> objects at all scales. This reduces the search space >> significantly than say compared to floating window. The >> output is NOT a image segmentaiton, rather a list of regions >> (bounding boxes) of potential objects (deteciton proposals). >> >> I have looked in the gallery at RAG Merging >> http://scikit-image.org/docs/dev/auto_examples/plot_rag_merge.html, >> fairly confident I can setup the callback methods to provided >> the similarity measure. I am naively hoping that >> future.graph.hierarchical(), even though it seems to output a >> segmentation (labels), can be easily adapted to the task. >> What would be the best way to have >> future.graph.merge_hierarchica() merge regions with the >> "highest" similarity measure, rather thana threshold? What >> would be the best way future.graph.merge_hierarchica() save >> each merged region? Tried setting "in_place" to false, but >> didn't notice any difference. >> >> Any help appreciated, >> >> Brickle. >> -- >> >> >> >> >> -- >> You received this message because you are subscribed to the >> Google Groups "scikit-image" group. >> To unsubscribe from this group and stop receiving emails from it, >> send an email to scikit-image+unsubscribe at googlegroups.com >> . >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google > Groups "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, > send an email to scikit-image+unsubscribe at googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google > Groups "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to scikit-image+unsubscribe at googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bricklemacho at gmail.com Thu Sep 17 12:16:08 2015 From: bricklemacho at gmail.com (bricklemacho at gmail.com) Date: Fri, 18 Sep 2015 00:16:08 +0800 Subject: future.graph.merge_hierarchical In-Reply-To: <159a3c46-282a-4504-991f-85ac2b0db525@googlegroups.com> References: <55EC2FA0.8040305@gmail.com> <1442396042883.ec84464c@Nodemailer> <55FAD835.5010300@gmail.com> <159a3c46-282a-4504-991f-85ac2b0db525@googlegroups.com> Message-ID: <55FAE748.4040809@gmail.com> Setting the threshold to infinity will merge everything, but in what order are the nodes merged? Assuming setting threshold to infinity works, I still need to save a copy of each merge. Any suggestions? Regards, Michael. -- On 17/09/2015 11:23 pm, Vighnesh Birodkar wrote: > Hello > > Rather than creating an alternative method, you could always set the threshold to infinity. Won't that work in your case ? > > Thanks > Vighnesh > From vighneshbirodkar at gmail.com Fri Sep 18 10:30:44 2015 From: vighneshbirodkar at gmail.com (Vighnesh Birodkar) Date: Fri, 18 Sep 2015 10:30:44 -0400 Subject: future.graph.merge_hierarchical In-Reply-To: <55FAE748.4040809@gmail.com> References: <55EC2FA0.8040305@gmail.com> <1442396042883.ec84464c@Nodemailer> <55FAD835.5010300@gmail.com> <159a3c46-282a-4504-991f-85ac2b0db525@googlegroups.com> <55FAE748.4040809@gmail.com> Message-ID: Hi Using in _ place = False, couldn't you get the entire sequence of merging from the root node ? On 17 Sep 2015 12:59, "bricklemacho at gmail.com" wrote: > Setting the threshold to infinity will merge everything, but in what order > are the nodes merged? > > Assuming setting threshold to infinity works, I still need to save a copy > of each merge. Any suggestions? > > Regards, > > Michael. > -- > > On 17/09/2015 11:23 pm, Vighnesh Birodkar wrote: > >> Hello >> >> Rather than creating an alternative method, you could always set the >> threshold to infinity. Won't that work in your case ? >> >> Thanks >> Vighnesh >> >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "scikit-image" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/scikit-image/rnsVLQ-tFJM/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > scikit-image+unsubscribe at googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bricklemacho at gmail.com Fri Sep 18 10:47:46 2015 From: bricklemacho at gmail.com (bricklemacho at gmail.com) Date: Fri, 18 Sep 2015 22:47:46 +0800 Subject: future.graph.merge_hierarchical In-Reply-To: References: <55EC2FA0.8040305@gmail.com> <1442396042883.ec84464c@Nodemailer> <55FAD835.5010300@gmail.com> <159a3c46-282a-4504-991f-85ac2b0db525@googlegroups.com> <55FAE748.4040809@gmail.com> Message-ID: <55FC2412.7040800@gmail.com> Hi Today I finished the code for a more generic RAG construction. Tomorrow I will start looking at the hierarchical merge code, hopefully I can report more then. Thanks for your help and suggestions, I am hopeful they will suffice. Michael. -- On 18/09/2015 10:30 pm, Vighnesh Birodkar wrote: > > Hi > > Using in _ place = False, couldn't you get the entire sequence of > merging from the root node ? > > On 17 Sep 2015 12:59, "bricklemacho at gmail.com > " > wrote: > > Setting the threshold to infinity will merge everything, but in > what order are the nodes merged? > > Assuming setting threshold to infinity works, I still need to > save a copy of each merge. Any suggestions? > > Regards, > > Michael. > -- > > On 17/09/2015 11:23 pm, Vighnesh Birodkar wrote: > > Hello > > Rather than creating an alternative method, you could always > set the threshold to infinity. Won't that work in your case ? > > Thanks > Vighnesh > > > -- > You received this message because you are subscribed to a topic in > the Google Groups "scikit-image" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/scikit-image/rnsVLQ-tFJM/unsubscribe. > To unsubscribe from this group and all its topics, send an email > to scikit-image+unsubscribe at googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google > Groups "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to scikit-image+unsubscribe at googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vighneshbirodkar at gmail.com Fri Sep 18 23:51:28 2015 From: vighneshbirodkar at gmail.com (Vighnesh Birodkar) Date: Fri, 18 Sep 2015 23:51:28 -0400 Subject: future.graph.merge_hierarchical In-Reply-To: <55FCBE64.5040203@gmail.com> References: <55EC2FA0.8040305@gmail.com> <1442396042883.ec84464c@Nodemailer> <55FAD835.5010300@gmail.com> <159a3c46-282a-4504-991f-85ac2b0db525@googlegroups.com> <55FAE748.4040809@gmail.com> <55FCBE64.5040203@gmail.com> Message-ID: Hello I am sorry, I was mistaken, there is no way of getting the merge sequence right now without changing the source. Thanks On Fri, Sep 18, 2015 at 9:46 PM, bricklemacho at gmail.com < bricklemacho at gmail.com> wrote: > Hi, > > My graph theory is pretty weak so I may be missing something obvious. Can > you elaborate a little more on your suggestion below. > > Are you saying the setting in_place=False, will the graph then retain a > copy of the intermediate steps? If so how do I access these intermediate > steps? > > Playing around with RAG Merging example (from the skimage gallery). If > set rag_copy=True, I will have the starting graph, and can use the labels > returned from merge_hierarchical to see the result of final merge, but I > can't see way to review the intermediate steps. > > Any help appreciated, > > Michael. > -- > > On 18/09/2015 10:30 pm, Vighnesh Birodkar wrote: > > Hi > > Using in _ place = False, couldn't you get the entire sequence of merging > from the root node ? > On 17 Sep 2015 12:59, " bricklemacho at gmail.com" < > bricklemacho at gmail.com> wrote: > >> Setting the threshold to infinity will merge everything, but in what >> order are the nodes merged? >> >> Assuming setting threshold to infinity works, I still need to save a >> copy of each merge. Any suggestions? >> >> Regards, >> >> Michael. >> -- >> >> On 17/09/2015 11:23 pm, Vighnesh Birodkar wrote: >> >>> Hello >>> >>> Rather than creating an alternative method, you could always set the >>> threshold to infinity. Won't that work in your case ? >>> >>> Thanks >>> Vighnesh >>> >>> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "scikit-image" group. >> To unsubscribe from this topic, visit >> >> https://groups.google.com/d/topic/scikit-image/rnsVLQ-tFJM/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> scikit-image+unsubscribe at googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to scikit-image+unsubscribe at googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to a topic in the > Google Groups "scikit-image" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/scikit-image/rnsVLQ-tFJM/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > scikit-image+unsubscribe at googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bricklemacho at gmail.com Fri Sep 18 21:46:12 2015 From: bricklemacho at gmail.com (bricklemacho at gmail.com) Date: Sat, 19 Sep 2015 09:46:12 +0800 Subject: future.graph.merge_hierarchical In-Reply-To: References: <55EC2FA0.8040305@gmail.com> <1442396042883.ec84464c@Nodemailer> <55FAD835.5010300@gmail.com> <159a3c46-282a-4504-991f-85ac2b0db525@googlegroups.com> <55FAE748.4040809@gmail.com> Message-ID: <55FCBE64.5040203@gmail.com> Hi, My graph theory is pretty weak so I may be missing something obvious. Can you elaborate a little more on your suggestion below. Are you saying the setting in_place=False, will the graph then retain a copy of the intermediate steps? If so how do I access these intermediate steps? Playing around with RAG Merging example (from the skimage gallery). If set rag_copy=True, I will have the starting graph, and can use the labels returned from merge_hierarchical to see the result of final merge, but I can't see way to review the intermediate steps. Any help appreciated, Michael. -- On 18/09/2015 10:30 pm, Vighnesh Birodkar wrote: > > Hi > > Using in _ place = False, couldn't you get the entire sequence of > merging from the root node ? > > On 17 Sep 2015 12:59, "bricklemacho at gmail.com > " > wrote: > > Setting the threshold to infinity will merge everything, but in > what order are the nodes merged? > > Assuming setting threshold to infinity works, I still need to > save a copy of each merge. Any suggestions? > > Regards, > > Michael. > -- > > On 17/09/2015 11:23 pm, Vighnesh Birodkar wrote: > > Hello > > Rather than creating an alternative method, you could always > set the threshold to infinity. Won't that work in your case ? > > Thanks > Vighnesh > > > -- > You received this message because you are subscribed to a topic in > the Google Groups "scikit-image" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/scikit-image/rnsVLQ-tFJM/unsubscribe. > To unsubscribe from this group and all its topics, send an email > to scikit-image+unsubscribe at googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google > Groups "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to scikit-image+unsubscribe at googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bricklemacho at gmail.com Sat Sep 19 16:54:40 2015 From: bricklemacho at gmail.com (bricklemacho at gmail.com) Date: Sun, 20 Sep 2015 04:54:40 +0800 Subject: future.graph.merge_hierarchical In-Reply-To: References: <55EC2FA0.8040305@gmail.com> <1442396042883.ec84464c@Nodemailer> <55FAD835.5010300@gmail.com> <159a3c46-282a-4504-991f-85ac2b0db525@googlegroups.com> <55FAE748.4040809@gmail.com> <55FCBE64.5040203@gmail.com> Message-ID: <55FDCB90.9000305@gmail.com> Hi Vighnesh, I am struggling with both Python and the graph stuff, hope you can help me. I have taken discussion off list. I am using your idea in your blog: Hierarchical Merging In Action. Similar to your seg_list[] concept, I plan to store a copy of the merged regions in a list. The best place appears to be at bottom of the while loop in merge_hierarchical (about line 130 in graph_merge.py). Default plan is to duplicate Lines 132-136 of graph_merge.py to create a label map: label_map = np.arange(labels.max() + 1) for ix, (n, d) in enumerate(rag.nodes_iter(data=True)): for label in d['labels']: label_map[label] = ix Seems bit of an overkill to traverse the entire graph each time. Is there any other way you can suggest? All I need is a label map that consists of two labels, one being the merged region and everything else grouped/labeled as another region. Any help appreciated. Regards, Michael. -- On 19/09/2015 11:51 am, Vighnesh Birodkar wrote: > Hello > > I am sorry, I was mistaken, there is no way of getting the merge > sequence right now without changing the source. > > Thanks > > > On Fri, Sep 18, 2015 at 9:46 PM, bricklemacho at gmail.com > > wrote: > > Hi, > > My graph theory is pretty weak so I may be missing something > obvious. Can you elaborate a little more on your suggestion below. > > Are you saying the setting in_place=False, will the graph then > retain a copy of the intermediate steps? If so how do I access > these intermediate steps? > > Playing around with RAG Merging example (from the skimage > gallery). If set rag_copy=True, I will have the starting graph, > and can use the labels returned from merge_hierarchical to see the > result of final merge, but I can't see way to review the > intermediate steps. > > Any help appreciated, > > Michael. > -- > > On 18/09/2015 10:30 pm, Vighnesh Birodkar wrote: >> >> Hi >> >> Using in _ place = False, couldn't you get the entire sequence of >> merging from the root node ? >> >> On 17 Sep 2015 12:59, "bricklemacho at gmail.com >> " > > wrote: >> >> Setting the threshold to infinity will merge everything, but >> in what order are the nodes merged? >> >> Assuming setting threshold to infinity works, I still need >> to save a copy of each merge. Any suggestions? >> >> Regards, >> >> Michael. >> -- >> >> On 17/09/2015 11:23 pm, Vighnesh Birodkar wrote: >> >> Hello >> >> Rather than creating an alternative method, you could >> always set the threshold to infinity. Won't that work in >> your case ? >> >> Thanks >> Vighnesh >> >> >> -- >> You received this message because you are subscribed to a >> topic in the Google Groups "scikit-image" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/scikit-image/rnsVLQ-tFJM/unsubscribe. >> To unsubscribe from this group and all its topics, send an >> email to scikit-image+unsubscribe at googlegroups.com >> . >> For more options, visit https://groups.google.com/d/optout. >> >> -- >> You received this message because you are subscribed to the >> Google Groups "scikit-image" group. >> To unsubscribe from this group and stop receiving emails from it, >> send an email to scikit-image+unsubscribe at googlegroups.com >> . >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to a topic in > the Google Groups "scikit-image" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/scikit-image/rnsVLQ-tFJM/unsubscribe. > To unsubscribe from this group and all its topics, send an email > to scikit-image+unsubscribe at googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google > Groups "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to scikit-image+unsubscribe at googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vighneshbirodkar at gmail.com Sun Sep 20 23:08:43 2015 From: vighneshbirodkar at gmail.com (Vighnesh Birodkar) Date: Sun, 20 Sep 2015 20:08:43 -0700 (PDT) Subject: future.graph.merge_hierarchical In-Reply-To: <55FF6D1F.6060904@gmail.com> References: <55EC2FA0.8040305@gmail.com> <1442396042883.ec84464c@Nodemailer> <55FAD835.5010300@gmail.com> <159a3c46-282a-4504-991f-85ac2b0db525@googlegroups.com> <55FAE748.4040809@gmail.com> <55FCBE64.5040203@gmail.com> <55FDCB90.9000305@gmail.com> <55FF6D1F.6060904@gmail.com> Message-ID: <9899acc7-99c4-4c36-aff5-8a32b2a83258@googlegroups.com> Hello For the demo videos in that post I was traversing the graph at each iteration to obtain the segmentation, see 118 of graph_merge.py https://github.com/vighneshbirodkar/scikit-image/compare/vighneshbirodkar:ha...ha_video This was because I needed the entire segmentation at each step to display it. Juan, I think you mean I traverse it only once in the code on master ? For the video I was indeed traversing it each time. The nodes are merged here https://github.com/scikit-image/scikit-image/blob/master/skimage/future/graph/graph_merge.py#L128 On line 127 you can inject your logic. So if I understand correctly, you want [src + dst](the regions being merged at that point of time) as one region and the rest of the graph as other ? label_map = np.arange(labels.max() + 1) for l in rag.node[src]['labels'] : Thanks Vighnesh On Sunday, September 20, 2015 at 10:36:36 PM UTC-4, bricklemacho wrote: > > Hi Juan, > > Because Vighnesh is smarter than me :) > > I can't see how to obtain the intermediate merger other than to create a > complete label_map at each step, which requires me to iterate over all the > nodes in the graph. I sure there is enough information at node to > reconstruct just local map/mask but I don't know how. > > Hope that clarifies. > > Regards, > > Michael. > -- > > > > > On 21/09/2015 8:50 am, Juan Nunez-Iglesias wrote: > > Hey Michael, > > I don't understand your question. Why are you traversing the graph "each > time"? Vighnesh only traverses it once? > > Juan. > > On Sun, Sep 20, 2015 at 6:55 AM brickl... at gmail.com > > wrote: > >> Hi Vighnesh, >> >> I am struggling with both Python and the graph stuff, hope you can help >> me. I have taken discussion off list. >> >> I am using your idea in your blog: Hierarchical Merging In Action. >> Similar to your seg_list[] concept, I plan to store a copy of the merged >> regions in a list. The best place appears to be at bottom of the while >> loop in merge_hierarchical (about line 130 in graph_merge.py). Default >> plan is to duplicate Lines 132-136 of graph_merge.py to create a label map: >> >> label_map = np.arange(labels.max() + 1) >> for ix, (n, d) in enumerate(rag.nodes_iter(data=True)): >> for label in d['labels']: >> label_map[label] = ix >> >> Seems bit of an overkill to traverse the entire graph each time. Is >> there any other way you can suggest? All I need is a label map that >> consists of two labels, one being the merged region and everything else >> grouped/labeled as another region. >> >> Any help appreciated. >> >> Regards, >> >> Michael. >> -- >> >> >> On 19/09/2015 11:51 am, Vighnesh Birodkar wrote: >> >> Hello >> >> I am sorry, I was mistaken, there is no way of getting the merge sequence >> right now without changing the source. >> >> Thanks >> >> >> On Fri, Sep 18, 2015 at 9:46 PM, brickl... at gmail.com < >> brickl... at gmail.com > wrote: >> >>> Hi, >>> >>> My graph theory is pretty weak so I may be missing something obvious. >>> Can you elaborate a little more on your suggestion below. >>> >>> Are you saying the setting in_place=False, will the graph then retain a >>> copy of the intermediate steps? If so how do I access these intermediate >>> steps? >>> >>> Playing around with RAG Merging example (from the skimage gallery). If >>> set rag_copy=True, I will have the starting graph, and can use the labels >>> returned from merge_hierarchical to see the result of final merge, but I >>> can't see way to review the intermediate steps. >>> >>> Any help appreciated, >>> >>> Michael. >>> -- >>> >>> On 18/09/2015 10:30 pm, Vighnesh Birodkar wrote: >>> >>> Hi >>> >>> Using in _ place = False, couldn't you get the entire sequence of >>> merging from the root node ? >>> On 17 Sep 2015 12:59, "brickl... at gmail.com " < >>> brickl... at gmail.com > wrote: >>> >>>> Setting the threshold to infinity will merge everything, but in what >>>> order are the nodes merged? >>>> >>>> Assuming setting threshold to infinity works, I still need to save a >>>> copy of each merge. Any suggestions? >>>> >>>> Regards, >>>> >>>> Michael. >>>> -- >>>> >>>> On 17/09/2015 11:23 pm, Vighnesh Birodkar wrote: >>>> >>>>> Hello >>>>> >>>>> Rather than creating an alternative method, you could always set the >>>>> threshold to infinity. Won't that work in your case ? >>>>> >>>>> Thanks >>>>> Vighnesh >>>>> >>>>> >>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "scikit-image" group. >>>> To unsubscribe from this topic, visit >>>> >>>> https://groups.google.com/d/topic/scikit-image/rnsVLQ-tFJM/unsubscribe. >>>> To unsubscribe from this group and all its topics, send an email to >>>> scikit-image... at googlegroups.com . >>>> For more options, visit >>>> https://groups.google.com/d/optout. >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "scikit-image" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to scikit-image... at googlegroups.com . >>> For more options, visit >>> https://groups.google.com/d/optout. >>> >>> >>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "scikit-image" group. >>> To unsubscribe from this topic, visit >>> >>> https://groups.google.com/d/topic/scikit-image/rnsVLQ-tFJM/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> scikit-image... at googlegroups.com . >>> For more options, visit >>> https://groups.google.com/d/optout. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "scikit-image" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to scikit-image... at googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "scikit-image" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to scikit-image... at googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to scikit-image... at googlegroups.com . > For more options, visit https://groups.google.com/d/optout. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vighneshbirodkar at gmail.com Sun Sep 20 23:13:54 2015 From: vighneshbirodkar at gmail.com (Vighnesh Birodkar) Date: Sun, 20 Sep 2015 20:13:54 -0700 (PDT) Subject: future.graph.merge_hierarchical In-Reply-To: <55E4675C.3030300@gmail.com> References: <55E4675C.3030300@gmail.com> Message-ID: <2c0fe6b2-5852-4b84-be9d-b132ef08cf70@googlegroups.com> Hello Sorry for the repost, I accidentally submitted incomplete code in the last one. For the demo videos in that post I was traversing the graph at each iteration to obtain the segmentation, see 118 of graph_merge.py https://github.com/vighneshbirodkar/scikit-image/compare/vighneshbirodkar:ha...ha_video This was because I needed the entire segmentation at each step to display it. Juan, I think you mean I traverse it only once in the code on master ? For the video I was indeed traversing it each time. The nodes are merged here https://github.com/scikit-image/scikit-image/blob/master/skimage/future/graph/graph_merge.py#L128 On line 127 you can inject your logic. So if I understand correctly, you want [src + dst](the regions being merged at that point of time) as one region and the rest of the graph as other ? label_map = np.arange(labels.max() + 1) label_map[:] = 2 # Label the rest of the graph as one region # Label src as one region for l in rag.node[src]['labels']: label_map[l] = 1 for l in rag.node[dst]['labels']: label_map[l] = 1 seg_list.append(labels[label_map]) Thanks Vighnesh On Tuesday, September 1, 2015 at 7:24:31 PM UTC-4, bricklemacho wrote: > > Hi All, > > I am looking at generating some detection proposals, see Hosang, Jan, et > al. "What makes for effective detection proposals?." *arXiv preprint > arXiv:1502.05082* (2015), http://arxiv.org/pdf/1502.05082.pdf Starting > with the Selective Search algorithm, Section 3 of Uijlings, Jasper RR, et > al. "Selective search for object recognition." *International journal of > computer vision* 104.2 (2013): 154-171, > https://staff.fnwi.uva.nl/th.gevers/pub/GeversIJCV2013.pdf > > The basic idea is the performing a hierarchical merging of the image, > where each new merge get added to the list of regions suspected to contain > an object, you can capture objects at all scales. This reduces the search > space significantly than say compared to floating window. The output is > NOT a image segmentaiton, rather a list of regions (bounding boxes) of > potential objects (deteciton proposals). > > I have looked in the gallery at RAG Merging > http://scikit-image.org/docs/dev/auto_examples/plot_rag_merge.html, > fairly confident I can setup the callback methods to provided the > similarity measure. I am naively hoping that future.graph.hierarchical(), > even though it seems to output a segmentation (labels), can be easily > adapted to the task. What would be the best way to have > future.graph.merge_hierarchica() merge regions with the "highest" > similarity measure, rather thana threshold? What would be the best way > future.graph.merge_hierarchica() save each merged region? Tried setting > "in_place" to false, but didn't notice any difference. > > Any help appreciated, > > Brickle. > -- > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vighneshbirodkar at gmail.com Sun Sep 20 23:45:26 2015 From: vighneshbirodkar at gmail.com (Vighnesh Birodkar) Date: Sun, 20 Sep 2015 20:45:26 -0700 (PDT) Subject: future.graph.merge_hierarchical In-Reply-To: <55FF78B1.7000209@gmail.com> References: <55E4675C.3030300@gmail.com> <2c0fe6b2-5852-4b84-be9d-b132ef08cf70@googlegroups.com> <55FF78B1.7000209@gmail.com> Message-ID: Hello Only if in_place = True. If not, the new node could be something entirely different. The new_id is the safer bet. Thanks Vighnesh On Sunday, September 20, 2015 at 11:26:12 PM UTC-4, bricklemacho wrote: > > Hi Vighnesh, > > That basically what I am after. If I inject the code at line 130 after > the merger then I only need use [dst] to create the label map, correct? > > I just submitted a [WIP] pull request, but will update code to reflect > these changes. > > Thanks for your help. > > Michael. > -- > > > > > On 21/09/2015 11:13 am, Vighnesh Birodkar wrote: > > Hello > > Sorry for the repost, I accidentally submitted incomplete code in the last > one. > > For the demo videos in that post I was traversing the graph at each > iteration to obtain the segmentation, see 118 of graph_merge.py > > https://github.com/vighneshbirodkar/scikit-image/compare/vighneshbirodkar:ha...ha_video > > This was because I needed the entire segmentation at each step to display > it. Juan, I think you mean I traverse it only once in the code on master ? > For the video I was indeed traversing it each time. > > The nodes are merged here > > https://github.com/scikit-image/scikit-image/blob/master/skimage/future/graph/graph_merge.py#L128 > > On line 127 you can inject your logic. > > So if I understand correctly, you want [src + dst](the regions being > merged at that point of time) as one region and the rest of the graph as > other ? > > label_map = np.arange(labels.max() + 1) > label_map[:] = 2 # Label the rest of the graph as one region > > # Label src as one region > for l in rag.node[src]['labels']: > label_map[l] = 1 > > > for l in rag.node[dst]['labels']: > label_map[l] = 1 > > seg_list.append(labels[label_map]) > > Thanks > Vighnesh > > > On Tuesday, September 1, 2015 at 7:24:31 PM UTC-4, bricklemacho wrote: >> >> Hi All, >> >> I am looking at generating some detection proposals, see Hosang, Jan, et >> al. "What makes for effective detection proposals?." *arXiv preprint >> arXiv:1502.05082* (2015), http://arxiv.org/pdf/1502.05082.pdf >> Starting with the Selective Search algorithm, Section 3 of Uijlings, >> Jasper RR, et al. "Selective search for object recognition." *International >> journal of computer vision* 104.2 (2013): 154-171, >> https://staff.fnwi.uva.nl/th.gevers/pub/GeversIJCV2013.pdf >> >> The basic idea is the performing a hierarchical merging of the image, >> where each new merge get added to the list of regions suspected to contain >> an object, you can capture objects at all scales. This reduces the search >> space significantly than say compared to floating window. The output is >> NOT a image segmentaiton, rather a list of regions (bounding boxes) of >> potential objects (deteciton proposals). >> >> I have looked in the gallery at RAG Merging >> >> http://scikit-image.org/docs/dev/auto_examples/plot_rag_merge.html, >> fairly confident I can setup the callback methods to provided the >> similarity measure. I am naively hoping that future.graph.hierarchical(), >> even though it seems to output a segmentation (labels), can be easily >> adapted to the task. What would be the best way to have >> future.graph.merge_hierarchica() merge regions with the "highest" >> similarity measure, rather thana threshold? What would be the best way >> future.graph.merge_hierarchica() save each merged region? Tried setting >> "in_place" to false, but didn't notice any difference. >> >> Any help appreciated, >> >> Brickle. >> -- >> >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jni.soma at gmail.com Sun Sep 20 20:50:20 2015 From: jni.soma at gmail.com (Juan Nunez-Iglesias) Date: Mon, 21 Sep 2015 00:50:20 +0000 Subject: future.graph.merge_hierarchical In-Reply-To: <55FDCB90.9000305@gmail.com> References: <55EC2FA0.8040305@gmail.com> <1442396042883.ec84464c@Nodemailer> <55FAD835.5010300@gmail.com> <159a3c46-282a-4504-991f-85ac2b0db525@googlegroups.com> <55FAE748.4040809@gmail.com> <55FCBE64.5040203@gmail.com> <55FDCB90.9000305@gmail.com> Message-ID: Hey Michael, I don't understand your question. Why are you traversing the graph "each time"? Vighnesh only traverses it once? Juan. On Sun, Sep 20, 2015 at 6:55 AM bricklemacho at gmail.com < bricklemacho at gmail.com> wrote: > Hi Vighnesh, > > I am struggling with both Python and the graph stuff, hope you can help > me. I have taken discussion off list. > > I am using your idea in your blog: Hierarchical Merging In Action. > Similar to your seg_list[] concept, I plan to store a copy of the merged > regions in a list. The best place appears to be at bottom of the while > loop in merge_hierarchical (about line 130 in graph_merge.py). Default > plan is to duplicate Lines 132-136 of graph_merge.py to create a label map: > > label_map = np.arange(labels.max() + 1) > for ix, (n, d) in enumerate(rag.nodes_iter(data=True)): > for label in d['labels']: > label_map[label] = ix > > Seems bit of an overkill to traverse the entire graph each time. Is > there any other way you can suggest? All I need is a label map that > consists of two labels, one being the merged region and everything else > grouped/labeled as another region. > > Any help appreciated. > > Regards, > > Michael. > -- > > > On 19/09/2015 11:51 am, Vighnesh Birodkar wrote: > > Hello > > I am sorry, I was mistaken, there is no way of getting the merge sequence > right now without changing the source. > > Thanks > > > On Fri, Sep 18, 2015 at 9:46 PM, bricklemacho at gmail.com < > bricklemacho at gmail.com> wrote: > >> Hi, >> >> My graph theory is pretty weak so I may be missing something obvious. >> Can you elaborate a little more on your suggestion below. >> >> Are you saying the setting in_place=False, will the graph then retain a >> copy of the intermediate steps? If so how do I access these intermediate >> steps? >> >> Playing around with RAG Merging example (from the skimage gallery). If >> set rag_copy=True, I will have the starting graph, and can use the labels >> returned from merge_hierarchical to see the result of final merge, but I >> can't see way to review the intermediate steps. >> >> Any help appreciated, >> >> Michael. >> -- >> >> On 18/09/2015 10:30 pm, Vighnesh Birodkar wrote: >> >> Hi >> >> Using in _ place = False, couldn't you get the entire sequence of merging >> from the root node ? >> On 17 Sep 2015 12:59, "bricklemacho at gmail.com" >> wrote: >> >>> Setting the threshold to infinity will merge everything, but in what >>> order are the nodes merged? >>> >>> Assuming setting threshold to infinity works, I still need to save a >>> copy of each merge. Any suggestions? >>> >>> Regards, >>> >>> Michael. >>> -- >>> >>> On 17/09/2015 11:23 pm, Vighnesh Birodkar wrote: >>> >>>> Hello >>>> >>>> Rather than creating an alternative method, you could always set the >>>> threshold to infinity. Won't that work in your case ? >>>> >>>> Thanks >>>> Vighnesh >>>> >>>> >>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "scikit-image" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/scikit-image/rnsVLQ-tFJM/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> scikit-image+unsubscribe at googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "scikit-image" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to scikit-image+unsubscribe at googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "scikit-image" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/scikit-image/rnsVLQ-tFJM/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> scikit-image+unsubscribe at googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to scikit-image+unsubscribe at googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to scikit-image+unsubscribe at googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bricklemacho at gmail.com Sun Sep 20 22:36:15 2015 From: bricklemacho at gmail.com (bricklemacho at gmail.com) Date: Mon, 21 Sep 2015 10:36:15 +0800 Subject: future.graph.merge_hierarchical In-Reply-To: References: <55EC2FA0.8040305@gmail.com> <1442396042883.ec84464c@Nodemailer> <55FAD835.5010300@gmail.com> <159a3c46-282a-4504-991f-85ac2b0db525@googlegroups.com> <55FAE748.4040809@gmail.com> <55FCBE64.5040203@gmail.com> <55FDCB90.9000305@gmail.com> Message-ID: <55FF6D1F.6060904@gmail.com> Hi Juan, Because Vighnesh is smarter than me :) I can't see how to obtain the intermediate merger other than to create a complete label_map at each step, which requires me to iterate over all the nodes in the graph. I sure there is enough information at node to reconstruct just local map/mask but I don't know how. Hope that clarifies. Regards, Michael. -- On 21/09/2015 8:50 am, Juan Nunez-Iglesias wrote: > Hey Michael, > > I don't understand your question. Why are you traversing the graph > "each time"? Vighnesh only traverses it once? > > Juan. > > On Sun, Sep 20, 2015 at 6:55 AM bricklemacho at gmail.com > > wrote: > > Hi Vighnesh, > > I am struggling with both Python and the graph stuff, hope you can > help me. I have taken discussion off list. > > I am using your idea in your blog: Hierarchical Merging In > Action. Similar to your seg_list[] concept, I plan to store a > copy of the merged regions in a list. The best place appears to > be at bottom of the while loop in merge_hierarchical (about line > 130 in graph_merge.py). Default plan is to duplicate Lines > 132-136 of graph_merge.py to create a label map: > > label_map = np.arange(labels.max() + 1) > for ix, (n, d) in enumerate(rag.nodes_iter(data=True)): > for label in d['labels']: > label_map[label] = ix > > Seems bit of an overkill to traverse the entire graph each time. > Is there any other way you can suggest? All I need is a label map > that consists of two labels, one being the merged region and > everything else grouped/labeled as another region. > > Any help appreciated. > > Regards, > > Michael. > -- > > > On 19/09/2015 11:51 am, Vighnesh Birodkar wrote: >> Hello >> >> I am sorry, I was mistaken, there is no way of getting the merge >> sequence right now without changing the source. >> >> Thanks >> >> >> On Fri, Sep 18, 2015 at 9:46 PM, bricklemacho at gmail.com >> > > wrote: >> >> Hi, >> >> My graph theory is pretty weak so I may be missing something >> obvious. Can you elaborate a little more on your suggestion >> below. >> >> Are you saying the setting in_place=False, will the graph >> then retain a copy of the intermediate steps? If so how do I >> access these intermediate steps? >> >> Playing around with RAG Merging example (from the skimage >> gallery). If set rag_copy=True, I will have the starting >> graph, and can use the labels returned from >> merge_hierarchical to see the result of final merge, but I >> can't see way to review the intermediate steps. >> >> Any help appreciated, >> >> Michael. >> -- >> >> On 18/09/2015 10:30 pm, Vighnesh Birodkar wrote: >>> >>> Hi >>> >>> Using in _ place = False, couldn't you get the entire >>> sequence of merging from the root node ? >>> >>> On 17 Sep 2015 12:59, "bricklemacho at gmail.com >>> " >> > wrote: >>> >>> Setting the threshold to infinity will merge everything, >>> but in what order are the nodes merged? >>> >>> Assuming setting threshold to infinity works, I still >>> need to save a copy of each merge. Any suggestions? >>> >>> Regards, >>> >>> Michael. >>> -- >>> >>> On 17/09/2015 11:23 pm, Vighnesh Birodkar wrote: >>> >>> Hello >>> >>> Rather than creating an alternative method, you >>> could always set the threshold to infinity. Won't >>> that work in your case ? >>> >>> Thanks >>> Vighnesh >>> >>> >>> -- >>> You received this message because you are subscribed to >>> a topic in the Google Groups "scikit-image" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/scikit-image/rnsVLQ-tFJM/unsubscribe. >>> To unsubscribe from this group and all its topics, send >>> an email to scikit-image+unsubscribe at googlegroups.com >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >>> -- >>> You received this message because you are subscribed to the >>> Google Groups "scikit-image" group. >>> To unsubscribe from this group and stop receiving emails >>> from it, send an email to >>> scikit-image+unsubscribe at googlegroups.com >>> . >>> For more options, visit https://groups.google.com/d/optout. >> >> -- >> You received this message because you are subscribed to a >> topic in the Google Groups "scikit-image" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/scikit-image/rnsVLQ-tFJM/unsubscribe. >> To unsubscribe from this group and all its topics, send an >> email to scikit-image+unsubscribe at googlegroups.com >> . >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- >> You received this message because you are subscribed to the >> Google Groups "scikit-image" group. >> To unsubscribe from this group and stop receiving emails from it, >> send an email to scikit-image+unsubscribe at googlegroups.com >> . >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google > Groups "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, > send an email to scikit-image+unsubscribe at googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google > Groups "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to scikit-image+unsubscribe at googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bricklemacho at gmail.com Sun Sep 20 23:25:37 2015 From: bricklemacho at gmail.com (bricklemacho at gmail.com) Date: Mon, 21 Sep 2015 11:25:37 +0800 Subject: future.graph.merge_hierarchical In-Reply-To: <2c0fe6b2-5852-4b84-be9d-b132ef08cf70@googlegroups.com> References: <55E4675C.3030300@gmail.com> <2c0fe6b2-5852-4b84-be9d-b132ef08cf70@googlegroups.com> Message-ID: <55FF78B1.7000209@gmail.com> Hi Vighnesh, That basically what I am after. If I inject the code at line 130 after the merger then I only need use [dst] to create the label map, correct? I just submitted a [WIP] pull request, but will update code to reflect these changes. Thanks for your help. Michael. -- On 21/09/2015 11:13 am, Vighnesh Birodkar wrote: > Hello > > Sorry for the repost, I accidentally submitted incomplete code in the > last one. > > For the demo videos in that post I was traversing the graph at each > iteration to obtain the segmentation, see 118 of graph_merge.py > https://github.com/vighneshbirodkar/scikit-image/compare/vighneshbirodkar:ha...ha_video > > > This was because I needed the entire segmentation at each step to > display it. Juan, I think you mean I traverse it only once in the code > on master ? For the video I was indeed traversing it each time. > > The nodes are merged here > https://github.com/scikit-image/scikit-image/blob/master/skimage/future/graph/graph_merge.py#L128 > > > On line 127 you can inject your logic. > > So if I understand correctly, you want [src + dst](the regions being > merged at that point of time) as one region and the rest of the graph > as other ? > > | > label_map = np.arange(labels.max() + 1) > label_map[:] = 2 # Label the rest of the graph as one region > > # Label src as one region > for l in rag.node[src]['labels']: > label_map[l] = 1 > > > for l in rag.node[dst]['labels']: > label_map[l] = 1 > > seg_list.append(labels[label_map]) > | > > Thanks > Vighnesh > > > On Tuesday, September 1, 2015 at 7:24:31 PM UTC-4, bricklemacho wrote: > > Hi All, > > I am looking at generating some detection proposals, see Hosang, > Jan, et al. "What makes for effective detection proposals?." > /arXiv preprint arXiv:1502.05082/ (2015), > http://arxiv.org/pdf/1502.05082.pdf > Starting with the Selective > Search algorithm, Section 3 of Uijlings, Jasper RR, et al. > "Selective search for object recognition." /International journal > of computer vision/ 104.2 (2013): 154-171, > https://staff.fnwi.uva.nl/th.gevers/pub/GeversIJCV2013.pdf > > > The basic idea is the performing a hierarchical merging of the > image, where each new merge get added to the list of regions > suspected to contain an object, you can capture objects at all > scales. This reduces the search space significantly than say > compared to floating window. The output is NOT a image > segmentaiton, rather a list of regions (bounding boxes) of > potential objects (deteciton proposals). > > I have looked in the gallery at RAG Merging > http://scikit-image.org/docs/dev/auto_examples/plot_rag_merge.html > , > fairly confident I can setup the callback methods to provided the > similarity measure. I am naively hoping that > future.graph.hierarchical(), even though it seems to output a > segmentation (labels), can be easily adapted to the task. What > would be the best way to have future.graph.merge_hierarchica() > merge regions with the "highest" similarity measure, rather thana > threshold? What would be the best way > future.graph.merge_hierarchica() save each merged region? Tried > setting "in_place" to false, but didn't notice any difference. > > Any help appreciated, > > Brickle. > -- > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Wed Sep 30 03:26:37 2015 From: stefanv at berkeley.edu (Stefan van der Walt) Date: Wed, 30 Sep 2015 00:26:37 -0700 Subject: Interactive gallery Message-ID: <87k2r8pdua.fsf@berkeley.edu> Hi everyone A year ago, we had a Google Summer of Code student working on an interactive gallery for scikit-image. That work is lying, more-or-less completed, on GitHub, without being used. Would anyone be willin to pick up the slack? It would require: - Learning the existing system - Administering the server and checking in from time to time to make sure it is running - Recompile the documentation with the required patches (minimal) I'd be happy to give a hand. I still think this would be very neat to have, and I don't know of many other projects that have this sort of thing in place. Thanks for your help! St?fan From stefanv at berkeley.edu Wed Sep 30 03:27:38 2015 From: stefanv at berkeley.edu (Stefan van der Walt) Date: Wed, 30 Sep 2015 00:27:38 -0700 Subject: Interactive gallery In-Reply-To: <87k2r8pdua.fsf@berkeley.edu> References: <87k2r8pdua.fsf@berkeley.edu> Message-ID: <87io6spdsl.fsf@berkeley.edu> On 2015-09-30 00:26:37, Stefan van der Walt wrote: > A year ago, we had a Google Summer of Code student working on an > interactive gallery for scikit-image. That work is lying, more-or-less > completed, on GitHub, without being used. The source code is here: https://github.com/scikit-image/skimage-sandbox St?fan From stuart at cadair.com Wed Sep 30 07:35:17 2015 From: stuart at cadair.com (Stuart Mumford) Date: Wed, 30 Sep 2015 12:35:17 +0100 Subject: Interactive gallery In-Reply-To: <87io6spdsl.fsf@berkeley.edu> References: <87k2r8pdua.fsf@berkeley.edu> <87io6spdsl.fsf@berkeley.edu> Message-ID: <560BC8F5.90503@cadair.com> Hi Stefan, I might be able to be persuaded to do this. I am currently looking at galleries for various SunPy related projects. Where are you hosting this at the moment? Stuart On 30/09/15 08:27, Stefan van der Walt wrote: > On 2015-09-30 00:26:37, Stefan van der Walt > wrote: >> A year ago, we had a Google Summer of Code student working on an >> interactive gallery for scikit-image. That work is lying, more-or-less >> completed, on GitHub, without being used. > > The source code is here: > > https://github.com/scikit-image/skimage-sandbox > > St?fan >