Divided the single images into 10X10 grid
On each grid, I need to implement text detection and get the results using tesseract.
when I implement threads my CPU goes to 100% usage until this whole task is done and I get variation in response time if I call this program again and again.
what is the efficient way to reduce cpu usage and results
for i in range(0,11):
gridCol = gridCol[1:] +[i]
#print("In Loop gridCol = ",gridCol)
gridRow = startGridRow
for j in range(0,11):
gridRow = gridRow[1:] +[j]
#print("In Loop gridRow = ",gridRow)
total_grid.append([gridRow,gridCol])
for grid in total_grid:
threads = threads + [self.executor.submit(self.textdetections, (grid[1],grid[0])])
question from:
https://stackoverflow.com/questions/65939942/efficient-way-to-implement-multiprocessing-or-multi-threading-when-image-is-divi 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…