sel118/LaneAF

OpenCV resize will block while using multi-process.

qinjian623 opened this issue · 4 comments

I've located the problem.

img = cv2.resize(img[14:, :, :], (1664, 576), interpolation=cv2.INTER_LINEAR)

Resize here will block the whole program.

How to avoid this?

Resizing to this size is essential because of the input requirements of DLA-34. I have not encountered any blocking behavior at my end. Were you able to produce this issue?
If you have to, I would suggest replacing the cv2.resize() function with PILs Image.resize() or something similar. You may have to convert the arrays to PIL images and back to do this though.

Opencv version installed from conda causes this problem. Pip version of opencv can solve this problem: pip install opencv-python

Opencv version installed from conda causes this problem. Pip version of opencv can solve this problem: pip install opencv-python

It works now. Thank you.

I have updated README to reflect this. Closing the issue now.