[ 
https://issues.apache.org/jira/browse/TIKA-2322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986022#comment-15986022
 ] 

ASF GitHub Bot commented on TIKA-2322:
--------------------------------------

chrismattmann commented on issue #168: fix for TIKA-2322 contributed by 
[email protected]
URL: https://github.com/apache/tika/pull/168#issuecomment-297613477
 
 
   So, the URLs were old in the config. I updated them to the v4, URLs, like so:
   
   ```diff
   diff --git 
a/tika-parsers/src/test/resources/org/apache/tika/parser/recognition/tika-config-tflow-video-rest.xml
 
b/tika-parsers/src/test/resources/org/apache/tika/parser/recognition/tika-config-tflow-video-rest.xml
   index f8037a7..c6c50ed 100644
   --- 
a/tika-parsers/src/test/resources/org/apache/tika/parser/recognition/tika-config-tflow-video-rest.xml
   +++ 
b/tika-parsers/src/test/resources/org/apache/tika/parser/recognition/tika-config-tflow-video-rest.xml
   @@ -24,8 +24,8 @@
                    <param name="topN" type="int">4</param>
                    <param name="minConfidence" type="double">0.015</param>
                    <param name="class" 
type="string">org.apache.tika.parser.recognition.tf.TensorflowRESTVideoRecogniser</param>
   -                <param name="healthUri" 
type="uri">http://localhost:8764/inception/v3/ping</param>
   -                <param name="apiUri" 
type="uri">http://localhost:8764/inception/v3/classify/video?mode=fixed</param>
   +                <param name="healthUri" 
type="uri">http://localhost:8764/inception/v4/ping</param>
   +                <param name="apiUri" 
type="uri">http://localhost:8764/inception/v4/classify/video?mode=fixed</param>
                </params>
            </parser>
        </parsers>
   ```
   
   Still broke:
   
   ```
   MC-053601:smadha-tika mattmann$ java -jar 
tika-app/target/tika-app-1.15-SNAPSHOT.jar 
--config=tika-parsers/src/test/resources/org/apache/tika/parser/recognition/tika-config-tflow-video-rest.xml
 ./tika-parsers/src/test/resources/test-documents/testVideoMp4.mp4
   WARN  JBIG2ImageReader not loaded. jbig2 files will be ignored
   INFO  Available = true, API Status = HTTP/1.0 200 OK
   INFO  minConfidence = 0.015, topN=4
   INFO  Recogniser = 
org.apache.tika.parser.recognition.tf.TensorflowRESTVideoRecogniser
   INFO  Recogniser Available = true
   INFO  I/O exception (java.net.SocketException) caught when processing 
request: Broken pipe
   INFO  Retrying request
   INFO  I/O exception (java.net.SocketException) caught when processing 
request: Broken pipe
   INFO  Retrying request
   INFO  I/O exception (java.net.SocketException) caught when processing 
request: Broken pipe
   INFO  Retrying request
   WARN  Broken pipe
   java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
        at 
org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractSessionOutputBuffer.java:169)
        at 
org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:119)
        at 
org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:115)
        at 
org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:98)
        at 
org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
        at 
org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:122)
        at 
org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:271)
        at 
org.apache.http.impl.conn.ManagedClientConnectionImpl.sendRequestEntity(ManagedClientConnectionImpl.java:197)
        at 
org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:257)
        at 
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
        at 
org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:715)
        at 
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:520)
        at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
        at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
        at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784)
        at 
org.apache.tika.parser.recognition.tf.TensorflowRESTRecogniser.recognise(TensorflowRESTRecogniser.java:119)
        at 
org.apache.tika.parser.recognition.ObjectRecognitionParser.parse(ObjectRecognitionParser.java:120)
        at 
org.apache.tika.parser.ParserDecorator.parse(ParserDecorator.java:188)
        at 
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
        at 
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
        at 
org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:135)
        at org.apache.tika.cli.TikaCLI$OutputType.process(TikaCLI.java:189)
        at org.apache.tika.cli.TikaCLI.process(TikaCLI.java:481)
        at org.apache.tika.cli.TikaCLI.main(TikaCLI.java:143)
   WARN  NO objects
   LMC-053601:smadha-tika mattmann$ 
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Video labeling using existing ObjectRecognition
> -----------------------------------------------
>
>                 Key: TIKA-2322
>                 URL: https://issues.apache.org/jira/browse/TIKA-2322
>             Project: Tika
>          Issue Type: Improvement
>          Components: parser
>            Reporter: Madhav Sharan
>            Assignee: Chris A. Mattmann
>              Labels: memex
>             Fix For: 1.15
>
>
> Currently TIKA supports ObjectRecognition in Images. I am proposing to extend 
> this to support videos. 
> Idea is -
> 1. Extract frames from video and run IncV3 to get labels for these frames. 
> 2. We average confidence scores of same labels for each frame. 
> 3. Return results in sorted order of confidence score. 
> I am writing code for different modes of frame extractions -
> 1. Extract center image.
> 2. Extract frames after every fixed interval.
> 3. Extract N frames equally divided across video.
> We used this approach in [0]. Code in [1]
> [0] https://github.com/USCDataScience/hadoop-pot
> [1] https://github.com/USCDataScience/video-recognition



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to