We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9128831 + cbc1d9d commit d62daf3Copy full SHA for d62daf3
create_lmdb_dataset.py
@@ -11,7 +11,7 @@
11
def checkImageIsValid(imageBin):
12
if imageBin is None:
13
return False
14
- imageBuf = np.fromstring(imageBin, dtype=np.uint8)
+ imageBuf = np.frombuffer(imageBin, dtype=np.uint8)
15
img = cv2.imdecode(imageBuf, cv2.IMREAD_GRAYSCALE)
16
imgH, imgW = img.shape[0], img.shape[1]
17
if imgH * imgW == 0:
0 commit comments