Automated CI toolchain to produce precompiled opencv-python, opencv-python-headless, opencv-contrib-python and opencv-contrib-python-headless packages.
imread_('/train/img/1728.bmp'): can't read header: OpenCV(4.5.1) /tmp/pip-req-build-7m_g9lbm/opencv/modules/imgcodecs/src/bitstrm.cpp:110: error: (-2:Unspecified error) Unexpected end of input stream in function 'readBlock' #767
When running the program, cv2. imread() will report an error after running dozens of epochs successfully. The error content is as follows.
When I run dozens of epochs in the resume model, the same error will be reported on different images
imread_('/gemini/code/LUSTER/DATA/word_extract/real/datasets/detection/train/img/Front_0000000000000024709_13248_1728.bmp'):
can't read header: OpenCV(4.5.1) /tmp/pip-req-build-7m_g9lbm/opencv/modules/imgcodecs/src/bitstrm.cpp:110: error: (-2:Unspecified error) Unexpected end of input stream in function 'readBlock'
Traceback (most recent call last):
File "train.py", line 207, in <module>
train_net(config)
File "train.py", line 111, in train_net
for batch_idx, (imgs, gts, gt_masks, thresh_maps, thresh_masks) in enumerate(train_loader):
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 681, in __next__
data = self._next_data()
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 1376, in _next_data
return self._process_data(data)
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 1402, in _process_data
data.reraise()
File "/usr/local/lib/python3.7/dist-packages/torch/_utils.py", line 461, in reraise
raise exception
AttributeError: Caught AttributeError in DataLoader worker process 11.
Original Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/gemini/code/LUSTER/Detection/DBnet-lite/dataloader/dataload.py", line 75, in __getitem__
img, polys = self.ra.random_scale(img, polys, 640, gt_path)
File "/gemini/code/LUSTER/Detection/DBnet-lite/dataloader/random_thansform.py", line 182, in random_scale
h, w = img.shape[0:2]
AttributeError: 'NoneType' object has no attribute 'shape'
Most probable reason: corrupted bmp file. Please ensure that your disk is in good fit and the file could be open with other tools besides OpenCV without issues.
When running the program, cv2. imread() will report an error after running dozens of epochs successfully. The error content is as follows. When I run dozens of epochs in the resume model, the same error will be reported on different images
The specific code is
version list: