Deep-Alignment-Network-tensorflow
Deep-Alignment-Network-tensorflow copied to clipboard
Error TestsetPreparation.py
Hi,
I have an error when run TestsetPreparation.py file:
Traceback (most recent call last):
File "TestSetPreparation.py", line 19, in
In ImageServer.py, turn boundingBoxDict = pickle.load(open(boundingBoxFiles[i], 'rb')) to boundingBoxDict = pickle.load(open(boundingBoxFiles[i], 'rb'), encoding='bytes')
Hi duduOliver, Thank you very much :)
Hi,
I have an error when run TestsetPreparation.py file:
File "TestSetPreparation.py", line 20, in
Hi,I have an error when run TestsetPreparation.py file: File "TestSetPreparation.py", line 20, in commonSet.PrepareData(commonSetImageDirs, commonSetBoundingBoxFiles, meanShape, 0, 1000, False) ImageServer.py", line 70, in PrepareData boundingBoxes.append(boundingBoxDict[basename]) KeyError: 'image_0193.png'
Excuse me. Have you solved the problem? I meet the same error with you. Thank you very much!
Hi,I have an error when run TestsetPreparation.py file: File "TestSetPreparation.py", line 20, in commonSet.PrepareData(commonSetImageDirs, commonSetBoundingBoxFiles, meanShape, 0, 1000, False) ImageServer.py", line 70, in PrepareData boundingBoxes.append(boundingBoxDict[basename]) KeyError: 'image_0193.png'
Excuse me. Have you solved the problem? I meet the same error with you. Thank you very much!
change the dict key to str ,like this :
boundingBoxDict = {}
for i in range(len(imageDirs)):
filenamesInDir = glob.glob(imageDirs[i] + "*.jpg")
filenamesInDir += glob.glob(imageDirs[i] + "*.png")
# import pdb; pdb.set_trace()
if boundingBoxFiles is not None:
boundingBoxDictTmp = pickle.load(open(boundingBoxFiles[i], 'rb'), encoding='bytes')
for k,v in boundingBoxDictTmp.items():
str_tmp = str(k,encoding = "utf8")
boundingBoxDict[str_tmp] = v