AIChallenger / AI_Challenger_2017

AI Challenger, a platform for open datasets and programming competitions to artificial intelligence (AI) talents around the world.
https://challenger.ai/
474 stars 196 forks source link

图像中文描述问题,总是提交格式错误? #30

Open 201528014227051 opened 6 years ago

201528014227051 commented 6 years ago

按照示例当中的代码保存为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=(',', ': '))))

JinmingZhao commented 6 years ago

再好好check一下代码,肯定 something wrong.

201528014227051 commented 6 years ago

谢谢回复,目前猜测可能是图像id顺序的问题,等试试再说吧,建议网站的错误提示应该可以再明确一点

201528014227051 commented 6 years ago

打开生成的json文件,对比也没有问题,这个问题拖延一周了。。。好尴尬,一直没法提交成功

chenghuige commented 6 years ago

@201528014227051 did you reload sys ? import sys, os reload(sys) sys.setdefaultencoding('utf8')

201528014227051 commented 6 years ago

@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.

opcoder commented 6 years ago

@201528014227051 测试集A有多少张图片

201528014227051 commented 6 years ago

@opcoder 30000

opcoder commented 6 years ago

@201528014227051 我提交也一直出错,我下载下来的train,val和test1解压之后都少一张。你看一下你是不是?格式问题应该都在AI_Challenger/Evaluation/caption_eval/data下面那几个例子里面了。

201528014227051 commented 6 years ago

@opcoder 应该不少,就是30000张吧?格式问题我已经请教过很多人喽,已经放弃啦

opcoder commented 6 years ago

@201528014227051 能提供一个test1的30000张图片的list吗,我觉得还可以抢救一下。

opcoder commented 6 years ago

@201528014227051 补上之后提交成功了。建议你按照上面那个路径提供的样子再check一下。

201528014227051 commented 6 years ago

@opcoder 补上差的一张?你的邮箱?

201528014227051 commented 6 years ago

@opcoder 你差的那张哪里找的?。。。

opcoder commented 6 years ago

@201528014227051 不用啦,我在linux下面解压之后会少一张,放到windows下面解压之后补上了缺的那张。你如果是30000张的话那应该没问题。你可以看一下你的结果文件json里面,image_id数量是不是30000,有没有重复以及caption有没有为空的。

201528014227051 commented 6 years ago

@opcoder 多谢