Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
201528014227051 opened this issue Oct 2, 2017 · 15 comments
Open

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

201528014227051 opened this issue Oct 2, 2017 · 15 comments

Comments

@201528014227051
Copy link

按照示例当中的代码保存为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
Copy link

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

@201528014227051
Copy link
Author

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

@201528014227051
Copy link
Author

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

@chenghuige
Copy link

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

@201528014227051
Copy link
Author

@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
Copy link

opcoder commented Nov 8, 2017

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

@201528014227051
Copy link
Author

@opcoder 30000

@opcoder
Copy link

opcoder commented Nov 8, 2017

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

@201528014227051
Copy link
Author

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

@opcoder
Copy link

opcoder commented Nov 8, 2017

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

@opcoder
Copy link

opcoder commented Nov 8, 2017

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

@201528014227051
Copy link
Author

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

@201528014227051
Copy link
Author

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

@opcoder
Copy link

opcoder commented Nov 8, 2017

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

@201528014227051
Copy link
Author

@opcoder 多谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants