当前位置:网站首页>Exception resolution: error of not finding edu.stanford.nlp.semgraph.semgrex.semgrexpattern in cococaption package
Exception resolution: error of not finding edu.stanford.nlp.semgraph.semgrex.semgrexpattern in cococaption package
2022-07-29 04:18:00 【Kayd】
Preface
Subtitle in video 、 Image caption task , A dependency package that must be used is coco-caption. The main function of this dependency is to evaluate the accuracy of the description generated by the model , among spice.py In file , An error will be reported when executing the following command :
java -jar -Xmx8G spice-1.0.jar coco-caption/pycocoevalcap/spice/tmp/tmp1wdsxtug -out coco-caption/pycocoevalcap/spice/tmp/tmpkj4h9o4j -subset -silent
abnormal
Java abnormal
Exception in thread "main" java.lang.NoClassDefFoundError: edu/stanford/nlp/semgraph/semgrex/SemgrexPattern
at edu.anu.spice.SpiceParser.<clinit>(SpiceParser.java:64)
at edu.anu.spice.SpiceScorer.scoreBatch(SpiceScorer.java:70)
at edu.anu.spice.SpiceScorer.main(SpiceScorer.java:60)
Caused by: java.lang.ClassNotFoundException: edu.stanford.nlp.semgraph.semgrex.SemgrexPattern
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
spice error
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/ubuntu/jdk1.8.0_333/bin/java', '-jar', '-Xmx8G', 'spice-1.0.jar', '/home/chenzw/code/SMAN/coco-caption/pycocoevalcap/spice/tmp/tmp98_yx34s', '-cache', '/home/chenzw/code/SMAN/coco-caption/pycocoevalcap/spice/cache/1658759575.7687752', '-out', '/home/chenzw/code/SMAN/coco-caption/pycocoevalcap/spice/tmp/tmpicxj0dmv', '-subset', '-silent']' returned non-zero exit status 1.
Terminating BlobFetcher
resolvent
perform coco-caption Project directory get_stanford_models.sh File can .
bash get_stanford_models.sh
The specific process of this document is actually Download the package we lack . Its content is :
#!/usr/bin/env sh
# This script downloads the Stanford CoreNLP models.
CORENLP=stanford-corenlp-full-2015-12-09
SPICELIB=pycocoevalcap/spice/lib
JAR=stanford-corenlp-3.6.0
DIR="$( cd "$(dirname "$0")" ; pwd -P )" cd $DIR if [ -f $SPICELIB/$JAR.jar ]; then echo "Found Stanford CoreNLP." else echo "Downloading..." wget http://nlp.stanford.edu/software/$CORENLP.zip echo "Unzipping..." unzip $CORENLP.zip -d $SPICELIB/ mv $SPICELIB/$CORENLP/$JAR.jar $SPICELIB/ mv $SPICELIB/$CORENLP/$JAR-models.jar $SPICELIB/ rm -f $CORENLP.zip rm -rf $SPICELIB/$CORENLP/ echo "Done."
fi
Perfect solution .
The end And the flower !
边栏推荐
- C language: typedef knowledge points summary
- Semantic segmentation correlation
- Target detection learning process
- BIO、NIO、AIO的区别和原理
- 通过js来实现一元二次方程的效果,输入a,b,c系数后可计算出x1和x2的值
- Object detection: object_ Detection API +ssd target detection model
- “蔚来杯“2022牛客暑期多校训练营2 H
- Whole house WiFi solution: mesh router networking and ac+ap
- 顺序表和链表
- Machine vision series 3:vs2019 opencv environment configuration
猜你喜欢

不会就坚持64天吧 查找插入位置

AssertionError(“Torch not compiled with CUDA enabled“)

It won't last for 65 days. It only appears once

伏英娜:元宇宙就是新一代互联网!

不会就坚持61天吧 最短的单词编码

Beginner: array & String

Why is it necessary to scale the attention before softmax (why divide by the square root of d_k)

不会就坚持65天吧 只出现一次的数字

Introduction and examples of parameters in Jenkins parametric construction

不会就坚持59天吧 替换单词
随机推荐
优炫数据库有办法查到主集群每天传给备集群的日志量吗?
Cad2020 introductory learning (2021.4.13)
Introduction and examples of parameters in Jenkins parametric construction
Why do I delete the original record (OP d) and then add a new one in Kafka when I update MySQL data
Value transmission and address transmission of C language, pointer of pointer
kotlin的List,Map,Set等集合类不指定类型
Interview notes of a company
C language: structure simple syntax summary
Implementation of jump connection of RESNET (pytorch)
Record of problems encountered in ROS learning
Rhel8 patch package production
为什么opengauss启动的时候这么多的unknown?
对一个元素使用多种变形的方法
不会就坚持71天吧 链表排序
不会就坚持70天吧 数组中第k大的数
C语言:枚举知识点总结
Leftmost prefix principle of index
How to execute insert into select from job in SQL client
不会就坚持67天吧 平方根
AssertionError(“Torch not compiled with CUDA enabled“)