OpenCV SelectiveSearch Segmentation
Hi,
I am trying to use OpenCV (4.1.2) SelectiveSearch segmentation in order to generate ROI proposals for really large images (e.g. 5000x4000). Following code takes too much time to process one image:
print("[INFO]: Calculating candidate region of interest using Selective Search ...")
ss = cv2.ximgproc.segmentation.createSelectiveSearchSegmentation()
ss.setBaseImage(img_0)
ss.switchToSelectiveSearchFast()
rects = ss.process()
print("[INFO]: Found {} candidate region of interests".format(len(rects)))
proposed_rects =[]
for (x, y, w, h) in rects:
proposed_rects.append((x, y, x + w, y +h))
As you can assume, I am using Python. Any suggestions in which I could increase performance of my results?
I am using this for Medical Images, so if there is any suggestion what can I do to tweak perforamnce of generating better ROI proposals I would love to hear it. Doesnt have to be selective search.
whoa, 5000x4000 is really large, and it's taking a few minutes here on VGA , already
it's a bit unclear what "ROI proposals" (for what ?) means, can you explain ?
can you get away with upscaling ROIs taken from a resized (smaller) image ?
there's also the hfs module in contrib and maybe you can find a pretrained ENet (cnn segmentation) model for medical stuff..
Try this:
U will have to downsized as @berak stating. I do not have 5kx4k. @berak, the link isn't working.
@supra56 - link updated, thanks for notice
Can u post image 5kx4k?