I'm doing some work that requires me using one of these to parse text from a screen. I've tried implementing both and I'm just completely unsure which is faster and has less strain on my pc. Does anyone have any tips?
Bonus question: another what is faster question. Should I take a single screenshot of the screen and parse the data from there after cropping to the relevant sections, or should I take multiple screenshots of the screen with those dimensions right away and then parse the data? Again, I've tried both methods and I can't tell which is better/faster.
Thanks!!!!
Did you try timing them to see which one is faster? For example:
import time
start_time = time.time()
main() #your function using opencv/pytesseract or multi screenshot/cropped
print(time.time()-start_time)
Related
I want to build a simple face recognition project. But Every time I start my program it takes really long time to encode all the Images and the load those encoded images.Can someone please tell me if I can pre-encode all the images and then directly load the encodings. I am a beginner please help me 😭😭.
I was trying to convert all the faces into numpy arrays but that did not quite workout. But I have a feeling that this is the direction I should go please tell me If I am right or not
In short words: if you already can get face encodings from your images into some data structure, - what a problem to store that data structure permanently for future use?! Use Pickle, some SQL (the simpliest one - sqlite3) or nonSQL database, whatever.
I just started with OCR and looking for a solution for the following problem.
I noticed that in some cases PyTorch detects two separate strings instead of a single string. This is indicated with the green rectangles in the screenshot. Is it possible to change some settings in order to avoid this?
Any suggestion, links and explanations are very welcome. As well as the introduction to new vocabulary in case my question is not well phrased.
Code:
import easyocr
reader = easyocr.Reader(['de'], gpu=False)
result = reader.readtext(file) # file is a jpg
I'm working on a project where I have to match one video sequence with the other. The actions and motions of the two videos are similar, since the video that I'm matching with is doing the exact same movement as the other one. And currently, I'm leaning towards using dynamic time warping(DTW) to align those two videos, but I have some trouble coming up with an idea to do so. So I'm wondering if you guys have any source code that I can work with or any ideas on how to dissect this problem. Thank you
a starting point would be to understand DTW https://www.cs.unm.edu/~mueen/DTW.pdf
I'm new to working with large amounts of data. I have a pretty big data set (around 1 million audio files each a couple seconds long), and I'm trying to load the data in an efficient manner for visualization purposes (and eventually to use as training data in a neural network).
What I've tried so far is using librosa (used librosa.load(filename)) but this took a couple hours just to load 10,000 of the files. I tried to find out if I could use a GPU to speed it up (fumbled around with Numba) but I'm not clear if this is even a valid problem for a GPU to solve.
I feel like I'm missing something really obvious. Can someone more experienced tell me what to do? I am having a hard time trying to find the solution on the Internet. Thanks for the help!
You could use pygame.
In this mini program I made, I tested out how long I takes to load a sound file that is about 10 seconds long:
import pygame
import time
pygame.init()
time_now = time.time()
sound = pygame.mixer.music.load('music.wav')
print(time.time() - time_now)
And this is the result is:
0.0
And if you want to play that file, you do:
pygame.mixer.music.play(loops=int, start=float)
It will take about 1-4 hour(s) to load all of them still.
For further info, go to https://www.pygame.org/docs/ref/music.html .
I’m a beginner and I’m having a lot of difficulties to plot my data contained in a csv file given that for this case the name months (which are abbreviated) in the file need to be necessarily converted to numbers. I’ve been told to use the library “time” and I’ve spent so many hours looking for possible solutions but nothing has worked yet. Any help would be much appreciated.
Using time Library for seems like an overkill. Easiest way to this would be to create a dictionary. But if you want to achieve this using time library then you can try
from time import strptime
strptime('Mar','%b').tm_mon