-scale in detector has been used as a member variable and shared between multiple threads. however scale heavily depends on the concrete image. if thread change occurs between calculation of scale, actual detection and postprocessing, then random behaviour and exceptions might happen. especially in the case of input images with varying sizes this might cause negative effects
-wrong scale factor calculation:
scale factor was calculated as: scale = target / source
whereas target and source are variables for the total number of pixels in the image (= width * height)
However, later on it was applied on the individual dimensions/components as width/height independantly:
e.g.: dims = (int(width * scale), int(height * scale))
or: int(face.left() / scale),
therefore scaling factor often was too small and detection for very big input images was performed on very small intermediate images
Therefore calculation has been changed to:
scale = sqrt(target / source)