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/
477 stars 196 forks source link

Why the online evaluation always failed? #17

Closed gujiuxiang closed 7 years ago

gujiuxiang commented 7 years ago

Hi, 为何我提交image cpaitoning结果,毫无任何反馈。我已经按照贵方的要求组织json了。按道理应该和mscoco online server一样给个反馈。

happygds commented 7 years ago

+1,对validation生成的json在本地评测运行就没问题,对test生成的json提交上去就报 提交格式错误。

chenghuige commented 7 years ago

@AIChallenger 不是说指标是bleu_4,cider..吗 为什么我看现在提交的同学结果,是如下呢,bleu_1了。。 BLEU_1 | CIDEr | METEOR | ROUGE_L

最好成绩是怎么算的呢 我看 meteor的指标怎么都是0

gujiuxiang commented 7 years ago

有人能提供下能正确被官方online server识别且计算出结果的json example吗 (还不知道提交的结果如何,结果就消耗光了2次机会,而且还是提交延时导致),这比赛好悲伤

chenghuige commented 7 years ago

@gujiuxiang 你的image_id带有.jpg吗

gujiuxiang commented 7 years ago

@chenghuige 按照官方的,没.jpg。但是每次上传总是验证超时,然后。。。没然后了 我提交的json结构如下: [{'caption': '一个戴着墨镜的男人走在平坦的道路上', 'image_id': 'bfa5ccf7fc824aa74a2058eb126617e3547bc734'}, {'caption': '球场上有两个穿着运动服的男人在争抢足球', 'image_id': 'dededfdba2559ab86c150116b46e218add867f71'}] 不知为何总是出错

chenghuige commented 7 years ago

@gujiuxiang 也许已经解决了 我把相关的代码 来自官方baseline中的代码贴出来 方便遇到相关问题的同学 假定输入流格式是‘image_id,caption'(utf8编码)

import sys
reload(sys)
sys.setdefaultencoding('utf8')
import json
import io

res = []
for line in sys.stdin:
    pic, catpion = line.strip().split('\t')
    res.append({'caption': catpion, 'image_id': pic})

with io.open(sys.argv[1], 'w', encoding='utf-8') as fd:
    fd.write(unicode(json.dumps(res, ensure_ascii=False, sort_keys=True, 
                              indent=2, separators=(',', ': '))))