Comments (9)
考虑到windows环境下可能出现的问题,代码做了部分修改
将图片名到int的映射从 int(int(hashlib.sha256(img_name).hexdigest(), 16) % sys.maxint)
替换为 self.image2hash[img_name]
,改用字典,key是图像名,value是对应的int值。
如果还有错,建议修改ptbtokenizer.py的53行 p_tokenizer = subprocess.Popen(cmd, cwd=path_to_jar_dirname, stdout=subprocess.PIPE)
为windows相应的用法。
其中cmd = ['java', '-cp', 'stanford-corenlp-3.4.1.jar', 'edu.stanford.nlp.process.PTBTokenizer', '-preserveLines', '-lowerCase', 'tmpeq6wbU']
from ai_challenger_2017.
好了,谢谢
还有一个疑问,就是这么改了源码后,在我生成自己的 reference.json
(跟给出的demo中的 id_to_words.json
结构一样)时,图片名到 id 的映射关系是怎样的?还是 int(int(hashlib.sha256(img_name).hexdigest(), 16) % sys.maxint)
么?
from ai_challenger_2017.
@自己做reference.json,很灵活,只要保证你自己的图片名有自己相应的int型id就好,保证一一对应就好。
from ai_challenger_2017.
明白了,谢谢
from ai_challenger_2017.
@WuLC Windows环境跑通了是吧?
from ai_challenger_2017.
是的,之前我跑自己的 reference.json
时,采用的映射关系也是用这种方式 int(int(hashlib.sha256(img_name).hexdigest(), 16) % sys.maxint)
,不过能够评分,没有报错。
是不是之前的demo 中 hash 后恰好有冲突?
from ai_challenger_2017.
@WuLC 应该是不同系统hashlib的计算结果不一样。
from ai_challenger_2017.
好,还是要抽空看下源码 >_<,关掉issue了
from ai_challenger_2017.
@WuLC python run_evaluations_test.py 脚本会报错吗? coco_res = coco.loadRes(json_predictions_file) 这里报错了, 由于id_to_test_words 没有images等关键字, 遇到过这个问题吗?
from ai_challenger_2017.
Related Issues (20)
- python: can't open file '../tensor2tensor/bin/t2t-trainer': [Errno 2] No such file or directory HOT 1
- 翻译任务-结果提交说明-文档错误-格式错误 HOT 1
- How to use "de-xml.pl" ?
- machine translation baseline run.sh error HOT 1
- How to download or use ai challenger dataset ? HOT 28
- I cann't download the data HOT 26
- python scene_eval.py ...error HOT 1
- Unable to download or access website HOT 7
- 请问为什么图像中文描述inference的结果几乎都是同样的一句话
- cannot download the dataset from the challengerAI HOT 2
- cannot download ai_challenger_translation chinese-english dataset
- What's the meaning of 2* in delta HOT 1
- # Note:亲,能帮忙再发一下嘛,失效了 HOT 19
- Hello, can you share a new dataset link HOT 68
- Could you share it on dropbox or google drive?
- 中文评价
- license information HOT 2
- 数据集链接失效 HOT 25
- 关于数据使用目的
- The new download link 最新下载地址 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ai_challenger_2017.