rapidsai / cucim

cuCIM - RAPIDS GPU-accelerated image processing library
https://docs.rapids.ai/api/cucim/stable/
Apache License 2.0
337 stars 58 forks source link

Incorporate a GPU-accelerated version of Scikit-Image’s “RANSAC” into RAPIDS cuCIM library #435

Open kkgreen1964 opened 1 year ago

kkgreen1964 commented 1 year ago

Is your feature request related to a problem? Please describe. One of the bottlenecks in my end-to-end Geospatial application for rapidly geolocating aerial imagery is the ability to perform image similarity quickly. Furthermore, RANSAC is critical to removing false matches by removing poor SIFT feature matches when comparing the Aerial (query) image to a Satellite (reference) sub-image.

Here is a visual depiction of applying RANSAC to improve SIFT feature matching: RANSAC Improves SIFT Feature Matching - One Slide.pptx

So I wish cuCIM had a GPU-accelerated version of RANSAC versus my current usage of the Scikit-Image implementation. This would enable me to have another stage of my application that keeps the processing on the GPU device versus having to return from processing on the device to processing on the host's CPU.

Describe the solution you'd like A successful GPU-accelerated version of Scikit-Image's "RANSAC" algorithm.

Describe alternatives you've considered I haven't considered any alternative solutions, and I haven't been able to find any GPU-accelerated versions of RANSAC.

Additional context I don't have any other context, code examples, but here is the URL to the Scikit-Image Github repo for RANSAC listed here: https://github.com/scikit-image/scikit-image/blob/v0.19.2/skimage/measure/fit.py#L628-L898

jakirkham commented 1 year ago

cc @gigony @grlee77 (as we discussed this today)

grlee77 commented 1 year ago

Thanks for raising the issue @kkgreen1964

For scikit-image the ransac function can take a user-defined model. The ones provided by the library are CircleModel, LineModelND and EllipseModel.

I am trying to judge how feasible accelerating these on the GPU is. What would be a typical size N for the data input to ransac in your use case?

Are you using one of these three models or some other custom ones?

kkgreen1964 commented 1 year ago

Evening Gregory,

Here is the command that I am using for RANSAC:

Import Scikit-image's RANSAC and various Transforms

from skimage.transform import AffineTransform, ProjectiveTransform from skimage.measure import ransac

model_robust, inliers = ransac((src, dst), AffineTransform, min_samples=MIN_MATCH_COUNT, residual_threshold=2, max_trials=300)

So I am not using any of those models that you mentioned.

On Wed, Nov 16, 2022 at 3:32 PM Gregory Lee @.***> wrote:

Thanks for raising the issue @KKGreen https://github.com/KKGreen.

For scikit-image the ransac function can take a user-defined model. The ones provided by the library are CircleModel, LineModelND and EllipseModel .

I am trying to judge how feasible accelerating these on the GPU is. What would be a typical size N for the data input to ransac in your use case?

— Reply to this email directly, view it on GitHub https://github.com/rapidsai/cucim/issues/435#issuecomment-1317632611, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJQHYVOKOMWZMVHLSYZXX3WIVAGJANCNFSM6AAAAAASBMRIKQ . You are receiving this because you authored the thread.Message ID: @.***>