ZZUTK/Face-Aging-CAAE

ValueError: invalid literal for int() with base 10: 'data\\UTKFace\\25'

okmmsky888 opened this issue · 4 comments

File "G:\faceAging\FaceAgingMaster\FaceAging.py", line 282, in train
label = int(str(sample_files[i]).split('/')[-1].split('_')[0])
ValueError: invalid literal for int() with base 10: 'data\UTKFace\25'

I was running, the emergence of this problem, is there any problem with the code?

ZZUTK commented

The code is parsing the label from file names. You may print out the file name where you got the error. The file name is supposed to have the format of [age]_[gender]_[race]_[date&time].jpg

Same error here. How do i print the file name where i got the error?

I have the same error,Has anyone solved it yet?

I have the same error,Has anyone solved it yet?

This small problem has bothered me for many days, and it has finally been solved.
You just need to change split('/') to split(' \ '),and the program will work.