Is it advisable to process the image by wavelet transformation before feeding it to the input of the neural network? To ns it was easier to classify images. Type using wavelet transform to find signs.
- This is a question. ("I have problems with intonation?") - Michael M
- oneI also did not understand where in this stream of sentences the question is - PaulD
- oneDo this and that, and write later what turned out to be more efficient, with code examples. - Sergiks
1 answer
As with any simplification of the source data, it is counterproductive to try to combine with neural networks. Yes, the memory traffic will decrease, but this will affect the quality of learning at times - perhaps it will simply not learn from simplified data. The fewer intermediaries between information and a neural network training program, the better!
def auto_canny(arr, mat, sigma=0.33): v = np.median(arr) lower = int(max(0, (1.0 - sigma) * v)) upper = int(min(255, (1.0 + sigma) * v)) edged = cv2.Canny(mat, lower, upper) return edged ... with mss.mss() as sct: while True: frame = np.array(sct.grab(monitor)) gray_image = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) gray_image = cv2.bilateralFilter(gray_image, 25, 25, cv2.BORDER_WRAP) gray_image = auto_canny(frame, gray_image) frame = cv2.cvtColor(gray_image, cv2.COLOR_GRAY2BGR) blob = cv2.dnn.blobFromImage(gray_image, 1 / 255.0, (416, 416), swapRB=False, crop=True) In practice, there was a case that made a program that applies a canny filter on an image supplied by a neural network. In theory, this should have accelerated the program by an order of magnitude, since instead of RGBA (32 bits), one bit per pixel was fed to the input. As a result, it worked, but very badly - I had to abandon this method.
Something like this looked like a synthetic sample for learning - it was automatically generated and allowed to learn the neural network to recognize the desired contour on any background. The implementation of the background noise generator was based on the warpPolar geometric conversion function from OpenCV.
It only cost us to try to train the classifier TWO circuits, using this principle, we have suffered a fiasco. In addition, the inscription victory from the same Dota2 does not work anymore - the letters are already and the sample will be completely ambiguous. Do not step on this rake, in my opinion, it is better to "glue" a sample of the finished data than to try to "generate" it. See how it works, you can here .

