Skip to content

Commit

Permalink
Merge pull request clovaai#48 from YacobBY/patch-2
Browse files Browse the repository at this point in the history
replaced deprecated fromstring() with frombuffer()
  • Loading branch information
ku21fan authored Aug 3, 2019
2 parents 9128831 + cbc1d9d commit d62daf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion create_lmdb_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def checkImageIsValid(imageBin):
if imageBin is None:
return False
imageBuf = np.fromstring(imageBin, dtype=np.uint8)
imageBuf = np.frombuffer(imageBin, dtype=np.uint8)
img = cv2.imdecode(imageBuf, cv2.IMREAD_GRAYSCALE)
imgH, imgW = img.shape[0], img.shape[1]
if imgH * imgW == 0:
Expand Down

0 comments on commit d62daf3

Please sign in to comment.