Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tika Wiki" for change notification.
The "TikaAndVisionDL4J" page has been changed by ChrisMattmann: https://wiki.apache.org/tika/TikaAndVisionDL4J?action=diff&rev1=12&rev2=13 Comment: - add VGG-16 docs <<TableOfContents(4)>> - This page describes a way to make Tika perform image recognition. Tika has many implementations of image recognition parsers. Specifically, this page provides information for an implementation powered by [[https://deeplearning4j.org/|Deeplearning4j]], InceptionNet-V3 model pre-trained on ImageNet dataset. + This page describes a way to make Tika perform image recognition. Tika has many implementations of image recognition parsers. Specifically, this page provides information for an implementation powered by [[https://deeplearning4j.org/|Deeplearning4j]], InceptionNet-V3 model pre-trained on ImageNet dataset and now - This model can detect a thousand different objects in the images. + with [[https://github.com/apache/tika/pulls/182|TIKA-2298]], the VGG-16 model. Both modesl can detect a thousand different objects in the images. The advantage of this particular setting is, this implementation runs inside a Java Virtual Machine (JVM) stack without dependence on any external services. So it is perfect for the users who are trying to run image recognition on a distributed setup like Apache Hadoop or Apache Spark. Note: - 1. This is a work in progress. This feature was added in Tika 1.15 + 1. This is a work in progress. Inception-V3 was added in Tika 1.15 and VGG-16 in 1.16. - 2. At the time of writing, Tika 1.15 was not released. You have to [clone Tika repository](https://github.com/apache/tika) and do '''mvn clean install'''. + 2. At the time of writing, Tika 1.16 was not released. You have to [clone Tika repository](https://github.com/apache/tika) and do '''mvn clean install'''. - 3. The rest of the page uses version '''1.15-SNAPSHOT''', however, if you are reading this after release, please use '''1.15''' or newer version. + 3. The rest of the page uses version '''1.15-SNAPSHOT''', however, if you are reading this after release, please use '''1.15''', '''1.16''' or newer version. = Java/Groovy/Scala example = @@ -41, +41 @@ </dependencies> }}} - '''A configuration, tika-config.xml, to activate image recognition model:''' + '''A configuration, tika-config.xml, to activate Inception-V3 image recognition model:''' {{{#!highlight xml <properties> @@ -57, +57 @@ </parsers> </properties> }}} + + + '''A configuration, tika-config.xml, to activate VGG-16 image recognition model:''' + + {{{#!highlight xml + <?xml version="1.0" encoding="UTF-8"?> + <properties> + <parsers> + <parser class="org.apache.tika.parser.recognition.ObjectRecognitionParser"> + <mime>image/jpeg</mime> + <params> + <param name="topN" type="int">2</param> + <param name="minConfidence" type="double">0.015</param> + <param name="class" type="string">org.apache.tika.dl.imagerec.DL4JVGG16Net</param> + <param name="modelType" type="string">VGG16</param> + <param name="serialize" type="string">yes</param> + </params> + </parser> + </parsers> + </properties> + }}} + Note: Refer to a later section for customizing the config.
