raisr icon indicating copy to clipboard operation
raisr copied to clipboard

The problem of runtime

Open Hill-Jiang opened this issue 6 years ago • 7 comments

@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?

Hill-Jiang avatar Apr 27 '18 06:04 Hill-Jiang

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!

movehand avatar Jun 30 '18 14:06 movehand

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 avatar Jul 06 '18 17:07 BlauerHunger

@BlauerHunger How can I do that? Can you show me the parallel processing source code file?

bluewidy avatar Jul 07 '18 07:07 bluewidy

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.

BlauerHunger avatar Jul 07 '18 09:07 BlauerHunger

@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 avatar Jul 17 '18 01:07 excllent123

@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]

hezc13 avatar Jul 26 '18 08:07 hezc13

any plans to get this working?

jtoy avatar Oct 19 '18 20:10 jtoy