dataset-tools icon indicating copy to clipboard operation
dataset-tools copied to clipboard

Error when running table recognition evaluation

Open zhxgj opened this issue 6 years ago • 11 comments

Hi, I used the following command to use the jar to evaluate my table recognitions. java -jar dataset-tools-20180206.jar -reg eu-001

But I got the error message below: Using GTFile: eu-001-reg.xml Using resultFile: eu-001-reg-result.xml Using PDFFile: eu-001.pdf startPage: 1 endPage: 2147483647 Current page no: 1 Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/jai/PlanarImage at at.ac.tuwien.dbai.pdfwrap.model.document.GenericSegment.tagName(GenericSegment.java:425) at at.ac.tuwien.dbai.pdfwrap.model.document.GenericSegment.toString(GenericSegment.java:215) at java.base/java.lang.String.valueOf(String.java:2801) at java.base/java.lang.StringBuilder.append(StringBuilder.java:135) at at.ac.tuwien.dbai.pdfwrap.pdfread.PDFObjectExtractor.processPages(PDFObjectExtractor.java:1464) at at.ac.tuwien.dbai.pdfwrap.pdfread.PDFObjectExtractor.findObjects(PDFObjectExtractor.java:1413) at at.ac.tuwien.dbai.pdfwrap.ProcessFile.processPDF(ProcessFile.java:188) at at.ac.tuwien.dbai.pdfwrap.MeasureRecognitionPerformance.main(MeasureRecognitionPerformance.java:291) Caused by: java.lang.ClassNotFoundException: javax.media.jai.PlanarImage at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) ... 8 more

My result file is attached below. eu-001-reg-result.xml.zip

Could you please help me with this error? Thank you very much.

zhxgj avatar Apr 20 '18 05:04 zhxgj

@zhxgj @tamirhassan Hi,have you slolved this problem? I am facing the problem either, and do not know how to slove it.

AHoou avatar May 25 '20 14:05 AHoou

@GZDXLQH I did not attempt to solve it because I am not familiar with java...

zhxgj avatar May 26 '20 01:05 zhxgj

@GZDXLQH I did not attempt to solve it because I am not familiar with java...

@zhxgj OK, thanks for your replay.

AHoou avatar May 26 '20 02:05 AHoou

Hi, there seems to be some problem with dependencies. Sorry about this. I will do a new build next week and update the libraries to the newest ones. In the meantime, you need to add com.springsource.javax.media.jai.core-1.1.3.jar, pdfbox-app-1.8.1.jar (not pdfbox-1.8.1.jar) and commons-collections-3.1.jar to the classpath and it should work.

tamirhassan avatar May 31 '20 13:05 tamirhassan

I have now pushed these extra JARs to the /lib directory. I will look at the code next week and see if I can remove these dependencies, but this should get you up and running for the time being.

tamirhassan avatar May 31 '20 13:05 tamirhassan

I have now pushed these extra JARs to the /lib directory. I will look at the code next week and see if I can remove these dependencies, but this should get you up and running for the time being.

Thanks!I will try it according to your steps!

AHoou avatar May 31 '20 13:05 AHoou

Hi @tamirhassan @GZDXLQH , I got the same problem. How can I fix it? I have added com.springsource.javax.media.jai.core-1.1.3.jar, pdfbox-app-1.8.1.jar (not pdfbox-1.8.1.jar) and commons-collections-3.1.jar to the .classpath file and running with the following command java -jar -classpath .classpath dataset-tools-20180206.jar -reg ../icdar2013-competition-dataset-with-gt/competition-dataset-eu/eu-001 I get the following error: Error: Could not find or load main class dataset-tools-20180206.jar

chuong-phung avatar Jun 29 '20 08:06 chuong-phung

@chuong-phung Hi, I am sorry to tell you I can't help you. I am not good at Java. So far, I don’t have time to re-evaluate the experiment according to tamirhassan's solution. (In fact, before tamirhassan gives me the solution, I have used the ICDAR 2019cTDaR tools to evaluate my recognition result of my table).

AHoou avatar Jun 29 '20 14:06 AHoou

Hi @GZDXLQH , Thanks for your replay

chuong-phung avatar Jun 30 '20 03:06 chuong-phung

@tamirhassan hi, I still meet this error. has this problem been solved?

Dod-o avatar Feb 09 '21 07:02 Dod-o

@tamirhassan Hi, I am also facing a similar error. Have the jar files been updated?

rudra0713 avatar Mar 16 '22 21:03 rudra0713