I compiled this app with enabling OpenMP. And run it for test on small dataset of eyes - 25 positive and 3 neg. images. And it freezes on Stage 1, but process possibly doing something, he takes 12% of CPU. I thought that negative image set is too small, and run another process with 25 pos and 25 neg. And it get stuck on Stage 2. Already long time. Maybe cause is OpenMP?