For my use case(Large image size) the current processing takes a lot of time. I found that get_dark_channel
and get_transmission
functions takes a lot of time to process. Thus i decided to change the numba to use cuda by doing the below changes following this reference
import sys
hr = HazeRemoval()
hr.open_image(sys.argv[1])
#################### For CUDA
# Set the number of threads in a block
threadsperblock = 32
# Calculate the number of thread blocks in the grid
blockspergrid = (hr.src.size + (threadsperblock - 1)) // threadsperblock
####################
hr.get_dark_channel[blockspergrid, threadsperblock]()
hr.get_air_light()
hr.get_transmission[blockspergrid, threadsperblock]()
hr.guided_filter()
hr.recover()
hr.show()
TypeError: Failed in nopython mode pipeline (step: fix up args)
Signature mismatch: 0 argument types given, but function takes 2 arguments