Open 201528014227051 opened 6 years ago
再好好check一下代码,肯定 something wrong.
谢谢回复,目前猜测可能是图像id顺序的问题,等试试再说吧,建议网站的错误提示应该可以再明确一点
打开生成的json文件,对比也没有问题,这个问题拖延一周了。。。好尴尬,一直没法提交成功
@201528014227051 did you reload sys ? import sys, os reload(sys) sys.setdefaultencoding('utf8')
@chenghuige yes, I have done that. I have done All things that I think need to be done. I have an idea that I give u the txt format predicted result, could u help me to generate json file. this is a way that I have not done before. leave u email if it is convenient for u. thanks.
@201528014227051 测试集A有多少张图片
@opcoder 30000
@201528014227051 我提交也一直出错,我下载下来的train,val和test1解压之后都少一张。你看一下你是不是?格式问题应该都在AI_Challenger/Evaluation/caption_eval/data下面那几个例子里面了。
@opcoder 应该不少,就是30000张吧?格式问题我已经请教过很多人喽,已经放弃啦
@201528014227051 能提供一个test1的30000张图片的list吗,我觉得还可以抢救一下。
@201528014227051 补上之后提交成功了。建议你按照上面那个路径提供的样子再check一下。
@opcoder 补上差的一张?你的邮箱?
@opcoder 你差的那张哪里找的?。。。
@201528014227051 不用啦,我在linux下面解压之后会少一张,放到windows下面解压之后补上了缺的那张。你如果是30000张的话那应该没问题。你可以看一下你的结果文件json里面,image_id数量是不是30000,有没有重复以及caption有没有为空的。
@opcoder 多谢
按照示例当中的代码保存为json格式,还是会出现格式错误问题??
with io.open('result6.json', 'w', encoding='utf-8') as fd: fd.write(unicode(json.dumps(data,ensure_ascii=False, sort_keys=True, indent=2, separators=(',', ': '))))