Ask Your Question

Revision history [back]

How to implement multi-processing ?

Hi, I tried to run face detection using multi processing I am getting below error

E:\git\opencv-dnn-demo\face_detectors>python sample.py

i am detect i am detect i am detect i am detect i am detect i am detect Traceback (most recent call last): File "sample.py", line 17, in <module> pool.map(fd.detect, imgs) File "C:\Anaconda3\lib\multiprocessing\pool.py", line 260, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "C:\Anaconda3\lib\multiprocessing\pool.py", line 608, in get raise self._value File "C:\Anaconda3\lib\multiprocessing\pool.py", line 119, in worker result = (True, func(args, *kwds)) File "C:\Anaconda3\lib\multiprocessing\pool.py", line 44, in mapstar return list(map(*args)) File "E:\git\opencv-dnn-demo\face_detectors\yolov2.py", line 34, in detect detections = self.net.forward() cv2.error: OpenCV(3.4.3) C:\projects\opencv-python\opencv\modules\dnn\src\dnn.cpp:841: error: (-215:Assertion failed) memHosts.find(lp) == memHosts.end() in function 'cv::dnn::experimental_dnn_34_v7::BlobManager::addHost' What was the issue sorry I new to CV and Yolo

click to hide/show revision 2
None

updated 2018-10-16 18:05:34 -0600

berak gravatar image

How to implement multi-processing ?

Hi, I tried to run face detection using multi processing I am getting below error

E:\git\opencv-dnn-demo\face_detectors>python sample.py

E:\git\opencv-dnn-demo\face_detectors>python sample.py

i am detect i am detect i am detect i am detect i am detect i am detect Traceback (most recent call last): File "sample.py", line 17, in <module> pool.map(fd.detect, imgs) File "C:\Anaconda3\lib\multiprocessing\pool.py", line 260, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "C:\Anaconda3\lib\multiprocessing\pool.py", line 608, in get raise self._value File "C:\Anaconda3\lib\multiprocessing\pool.py", line 119, in worker result = (True, func(args, *kwds)) func(*args, **kwds)) File "C:\Anaconda3\lib\multiprocessing\pool.py", line 44, in mapstar return list(map(*args)) File "E:\git\opencv-dnn-demo\face_detectors\yolov2.py", line 34, in detect detections = self.net.forward() cv2.error: OpenCV(3.4.3) C:\projects\opencv-python\opencv\modules\dnn\src\dnn.cpp:841: error: (-215:Assertion failed) memHosts.find(lp) == memHosts.end() in function 'cv::dnn::experimental_dnn_34_v7::BlobManager::addHost'

What was the issue sorry I new to CV and Yolo