Skip to content
Advertisement

Why did multiprocessing giving me EOFError : Ran out of Input Error?

videoPlayerThreading is my own made library to basically making 2 class with each using threading to get and show frames. objDect is also my own library to basically return frame after object detection. I got EOFError : Ran out of Input error and from the traceback I think it is caused by the multiprocessing itself hence I don’t post my library because it is so long. Can anyone help me with what is wrong with it? Thank you

JavaScript

Edit :
Here is the show frames and get frames class it basically only get and show frame using threading.

JavaScript

Advertisement

Answer

The best I can understand your program logic you need something like the following. Generator function read_frames (which may or may not need correction), reads the frames one by one yielding each frame. The main process creates a multiprocessing pool and passes each input frame to the multiprocessing pool to be processed by obd.predictYolo and sets vpt.frame with the returned frame. This continues until either there are no more frames to process or showFrame.doVideo is False. In short, I have done away with your getFrames class, which is useless here.

I do not have OpenCV installed and do not really know the package nor do I have your video file, so consider this a starting point for your further investigation.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement