Tianxiaomo / pytorch-YOLOv4

PyTorch ,ONNX and TensorRT implementation of YOLOv4
Apache License 2.0
4.47k stars 1.49k forks source link

RuntimeError: DataLoader worker (pid(s) 15188, 15032, 17116) exited unexpectedly #480

Open tony71200 opened 3 years ago

tony71200 commented 3 years ago

I am training the data set with 21435 images. but the code stop at epoch 3. Epoch 3/30: 0%| | 0/6828 [00:00<?, ?img/s]OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 Traceback (most recent call last): File "C:\Users\tony10200\anaconda3\envs\yolov4\lib\multiprocessing\queues.py", line 236, in _feed obj = _ForkingPickler.dumps(obj) File "C:\Users\tony10200\anaconda3\envs\yolov4\lib\multiprocessing\reduction.py", line 51, in dumps cls(buf, protocol).dump(obj) _pickle.PicklingError: Can't pickle <class 'MemoryError'>: it's not the same object as builtins.MemoryError OpenCV can't augment image: 512 x 512 OpenCV can't augment image: 512 x 512 Epoch 3/30: 0%| | 0/6828 [00:51<?, ?img/s] Traceback (most recent call last): File "C:\Users\tony10200\anaconda3\envs\yolov4\lib\site-packages\torch\utils\data\dataloader.py", line 990, in _try_get_data data = self._data_queue.get(timeout=timeout) File "C:\Users\tony10200\anaconda3\envs\yolov4\lib\queue.py", line 178, in get raise Empty _queue.Empty

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "train.py", line 625, in device=device) File "train.py", line 370, in train for i, batch in enumerate(train_loader): File "C:\Users\tony10200\anaconda3\envs\yolov4\lib\site-packages\torch\utils\data\dataloader.py", line 521, in next data = self._next_data() File "C:\Users\tony10200\anaconda3\envs\yolov4\lib\site-packages\torch\utils\data\dataloader.py", line 1186, in _next_data idx, data = self._get_data() File "C:\Users\tony10200\anaconda3\envs\yolov4\lib\site-packages\torch\utils\data\dataloader.py", line 1142, in _get_data success, data = self._try_get_data() File "C:\Users\tony10200\anaconda3\envs\yolov4\lib\site-packages\torch\utils\data\dataloader.py", line 1003, in _try_get_data raise RuntimeError('DataLoader worker (pid(s) {}) exited unexpectedly'.format(pids_str)) from e RuntimeError: DataLoader worker (pid(s) 15188, 15032, 17116) exited unexpectedly

Can you help me?

jielyu commented 2 years ago

@tony71200 this problem may relate to opencv_python version. opencv 3.4.4 works well.

tony71200 commented 2 years ago

3.4.4

thank you so much