raisr
raisr copied to clipboard
The problem of runtime
@movehand Hello, can I ask you a question about the running speed of the program? GOOGLE says that the RAISR runtime is about 10^-2 to 10^-1 seconds. But I test it and the actual running time of a 512*512 medium sized image on the i7 processor was tens of seconds. Why the difference between the two running time is so huge?
I think it's simply the method of the actual implementation. This project is simply a rough guide of how RAISR works. So, without unrolling loop, parallelizing, etc. PyCUDA may be a nice option to speed things up!
It would probably help to get rid of the numpy arrays. Then it would be easy to parallelize the preprocessing on the cpu using multiprocessing.Pool.
@BlauerHunger How can I do that? Can you show me the parallel processing source code file?
Multiprocessing is explained here: https://docs.python.org/3/library/multiprocessing.html
You can run a function over every element of a list in n processes running in parallel using Pool(n).map(function, list)
. Since the globals are copies and not shared, sharing data (such as the q and v) must be done either using returns (this might even be possible using the numpy arrays) or this way: https://docs.python.org/3/library/multiprocessing.html#sharing-state-between-processes
Additional efficiency could be gained by adding type information and compiling the project with cython.
@Shuaibishay Have you compared the result with A+? The result is bad compared with A+.and train takes a week in i7-8700 under div2k dateset.
@excllent123 Could you offer me your A+ code?I want to compare the results between the two algorithms.You can touch me with [email protected]
any plans to get this working?