0xPrateek / Photoroid

Fastest Image scanner using openCV & Dhash :rocket:
GNU General Public License v3.0
45 stars 21 forks source link

Adding multithreaded based scanning #2

Closed 0xPrateek closed 4 years ago

0xPrateek commented 5 years ago

Objective : Matching multiple images at the same time using multi-threading.

VishalS99 commented 4 years ago

Hey, I would like to take this up!

0xPrateek commented 4 years ago

Can you please write your approach for working out on this issue?

VishalS99 commented 4 years ago

Yeah, so, at present what I have done is created threads that will be used to dissect the template into multiple sub images, and then created a thread for every image to be checked against. I have gotten a speed up of approx 2.5

VishalS99 commented 4 years ago

With the current images part of the repo itself, the original code ran for 0. 46 ms whereas the threaded version ran for 0.2 ms

VishalS99 commented 4 years ago

Is this method good enough?

VishalS99 commented 4 years ago

Shall I give a PR?

0xPrateek commented 4 years ago

I was thinking we should first fix the issue we all working on #11 and #8 because it would be easy for us.

VishalS99 commented 4 years ago

But anyways I'll push the code, so that you can check and see if the my current method for multithreading is okay?

VishalS99 commented 4 years ago

Also I've analysed and understood that multithreading is not actual multithreading in python. Instead iam gonna try multi processing

VishalS99 commented 4 years ago

We can also update the current threaded version for the new algorithm. I have properly separated the code so that any new algo can easily be added to it

0xPrateek commented 4 years ago

Sounds Good..! Anything that improves photoroid is accepted. I'll take a look at your PR.