Skip to content

Commit d62daf3

Browse files
authored
Merge pull request clovaai#48 from YacobBY/patch-2
replaced deprecated fromstring() with frombuffer()
2 parents 9128831 + cbc1d9d commit d62daf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

create_lmdb_dataset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
def checkImageIsValid(imageBin):
1212
if imageBin is None:
1313
return False
14-
imageBuf = np.fromstring(imageBin, dtype=np.uint8)
14+
imageBuf = np.frombuffer(imageBin, dtype=np.uint8)
1515
img = cv2.imdecode(imageBuf, cv2.IMREAD_GRAYSCALE)
1616
imgH, imgW = img.shape[0], img.shape[1]
1717
if imgH * imgW == 0:

0 commit comments

Comments
 (0)